robotpy / robotpy-cppheaderparser

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

Add support to variable with [] inside type #85

Closed bansan85 closed 6 months ago

bansan85 commented 6 months ago

Like std::unique_ptr<int[]> variable;

virtuald commented 6 months ago

Needs tests.

Also, have you tried https://github.com/robotpy/cxxheaderparser? It supports constructs like that already.

bansan85 commented 6 months ago

Sure. I will update the PR.

I use this deprecated library because the project https://github.com/thibaultmarin/hpp2plantuml uses it.

I will (try to) send another PR to add support about int i {0};. The field is currently skipped.

bansan85 commented 6 months ago

I also fixed two tests.

I just have a doubt. The output format is std::unique_ptr<int [ ] >. Is it fine ?

bansan85 commented 6 months ago

I used the same MR to add support for initialization with {}. Hope it's fine. Review by commit will be easier than review the whole MR at once.

virtuald commented 6 months ago

Also, please merge in main, which fixes github actions.

bansan85 commented 6 months ago

Also, please merge in main, which fixes github actions.

Done

virtuald commented 6 months ago

Looks like you broke a test.

bansan85 commented 6 months ago

Fixed. A wrong index in a test.