Menu

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

v1.0 (example)
open
nobody
None
5
2025-08-08
2020-03-26
No

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

Discussion

  • Dustin Spicuzza

    Dustin Spicuzza - 2020-08-31

    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

     
  • Matej Cepl

    Matej Cepl - 2025-08-06

    I think the right place these days is https://github.com/senex/cppheaderparser/

     
  • Dustin Spicuzza

    Dustin Spicuzza - 2025-08-08

    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.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.