fixed parsing enums with tailing comma

gen2.py reports headers it processes
cmake file restructured
This commit is contained in:
Alexander Mordvintsev
2014-07-23 14:54:04 +04:00
committed by Alexander Mordvintsev
parent 964657a155
commit 42ecfc5538
3 changed files with 30 additions and 29 deletions

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

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 = []