fixed parsing enums with tailing comma

gen2.py reports headers it processes
cmake file restructured
This commit is contained in:
Alexander Mordvintsev authored and Alexander Mordvintsev committed 2014-07-27 17:17:35 +04:00
1 parent 964657a155
commit 42ecfc5538
3 files changed
+30 -29

No files matched your search

+1
View File
@@ -831,6 +831,7 @@ class PythonWrapperGenerator(object):
# step 1: scan the headers and build more descriptive maps of classes, consts, functions
for hdr in srcfiles:
print(hdr)
decls = parser.parse(hdr)
if len(decls) == 0:
continue
+2
View File
@@ -206,6 +206,8 @@ class CppHeaderParser(object):
def parse_enum(self, decl_str):
l = decl_str
ll = l.split(",")
if ll[-1].strip() == "":
ll = ll[:-1]
prev_val = ""
prev_val_delta = -1
decl = []