Enum values have inserted a space between the numeric sign and the number
Brought to you by:
senexcanis
Enum values have inserted a space between the numeric sign and the number:
h=CppHeaderParser.CppHeader('''enum {
FOO = -123
};
''', argType='string')
print(h.enums)
yields:
[{'line_number': 1,
'namespace': '',
'type': int,
'typedef': False,
'values': [{'name': 'FOO', 'value': '- 123'}]}]
Note the space between '-' and '123'.
I don't think this CppHeaderParser is maintained anymore, but I've recorded the bug report on our fork: https://github.com/robotpy/robotpy-cppheaderparser/issues/47
I think the right place these days is https://github.com/senex/cppheaderparser/
Heh. There hasn't been a release of the original project since 2016, so I think it's still not maintained -- but I've also dropped my fork as well.
I encourage you to check out cxxheaderparser (live demo at https://robotpy.github.io/cxxheaderparser/), it supports a lot more syntax than CppHeaderParser and the output is easy to understand too.