Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declaration is_const() returns true if declared with specifier constexpr #17

Merged
merged 1 commit into from
Aug 25, 2024

Conversation

finger563
Copy link
Contributor

@finger563 finger563 commented Aug 25, 2024

Updated srcmlcpp to check for constexpr as well as const when determining if a declaration is_const().

Added test as well.

Closes #16

@finger563 finger563 changed the title fix #16 handle static constexpr Property return declaration as const if declared with constexpr Aug 25, 2024
@finger563 finger563 changed the title Property return declaration as const if declared with constexpr Properly return declaration as const if declared with constexpr Aug 25, 2024
@finger563 finger563 changed the title Properly return declaration as const if declared with constexpr Declaration is_const() returns true if declared with specifier constexpr Aug 25, 2024
@pthom
Copy link
Owner

pthom commented Aug 25, 2024

Hi William,

Thanks a lot, this is perfect, and also thanks for adding a test.

PS: I saw that you merged your PR esp-cpp/espp#291 . Congrats! Are you happy with the result?

Cheers

@pthom pthom merged commit f2c0b43 into pthom:main Aug 25, 2024
3 checks passed
@finger563
Copy link
Contributor Author

Hey Pascal,

Thanks! And it's definitely a huge improvement over manually writing the binding code, even if I did have to refactor the code heavily to support parsing and generation.

Been using it to make some nice python tooling and interfaces for another project which uses espp which has been great.

Definitely looking forward to working through the two open issues so that there aren't any manual modifications required after generating the bindings 🚀

Thanks again for putting this project together, its a huge step up in development!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

static constexpr is generated as def_readwrite_static instead of def_readonly_static
2 participants