diff --git a/JsonGenerator/source/header_loader.py b/JsonGenerator/source/header_loader.py index faf80d6f..f4cee0d6 100644 --- a/JsonGenerator/source/header_loader.py +++ b/JsonGenerator/source/header_loader.py @@ -60,7 +60,7 @@ def __to_pascal(string, uppercase=True): if not string.isupper() and '_' not in string: _pascal = [x[0].upper() + x[1:] for x in _split] else: - _pascal = [x.capitalize() for x in _split] + _pascal = [x.title() for x in _split] if uppercase: if _split[0].isupper() and not string.isupper() and '_' not in string: diff --git a/ProxyStubGenerator/CppParser.py b/ProxyStubGenerator/CppParser.py index 3eb204a6..405e5d1a 100755 --- a/ProxyStubGenerator/CppParser.py +++ b/ProxyStubGenerator/CppParser.py @@ -2621,6 +2621,8 @@ def Parse(contents,log = None): new_enum.meta.decorators.append("encode:text") encode_enum_next = False + text_next = None + # Parse class access specifier... elif isinstance(current_block[-1], Class) and tokens[i] == ':': current_block[-1]._current_access = tokens[i - 1] @@ -2849,6 +2851,11 @@ def Parse(contents,log = None): value = entry[where + 1:] del entry[where:] + if text_next: + # handle case when @text precedes the first enumerator + entry = entry + ["@TEXT", [text_next]] + text_next = None + Enumerator(enum, entry, value, enum.type) if tokens[i + 1] == '}': i += 1 # handle ,} situation @@ -2857,6 +2864,7 @@ def Parse(contents,log = None): break else: j = i + 1 + i += 1 if in_typedef: