robotpy / robotpy-cppheaderparser

DEPRECATED: use cxxheaderparser instead
Other
123 stars 39 forks source link

Enum values have inserted a space between the numeric sign and the number #47

Open virtuald opened 4 years ago

virtuald commented 4 years ago

Copied from: https://sourceforge.net/p/cppheaderparser/bugs/65/ Reported by: https://sourceforge.net/u/phlibi/

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'.