robotpy / robotpy-cppheaderparser

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

Can not parse when propertie has a initial value #69

Closed mmooyyii closed 3 years ago

mmooyyii commented 3 years ago

cat a.h

#pragma once
struct A {
  char a[10] = {0};
};
>>> import CppHeaderParser
>>> a = CppHeaderParser.CppHeader('a.h')
>>> a.classes['A']
{'nested_classes': [], 'parent': None, 'abstract': False, 'namespace': '', 'final': False, 'name': 'A', 'line_number': 2, 'inherits': [], 'methods': {'public': [], 'protected': [], 'private': []}, 'properties': {'public': [], 'protected': [], 'private': []}, 'enums': {'public': [], 'protected': [], 'private': []}, 'structs': {'public': [], 'protected': [], 'private': []}, 'typedefs': {'public': [], 'protected': [], 'private': []}, 'forward_declares': {'public': [], 'protected': [], 'private': []}, 'declaration_method': 'struct'}
virtuald commented 3 years ago

Happy to accept a PR for this, but not interested in fixing it myself.

Recommend you try https://github.com/robotpy/cxxheaderparser instead (though I don't know if it would work with this either); once I migrate my large project to use it I will be dropping maintenance of this project, which will likely be this fall.