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

Document type for the Clang parser #84

Merged
merged 3 commits into from
Sep 1, 2020

Conversation

HertzDevil
Copy link
Contributor

This refactor brings the equivalent of Crystal's Bindgen::Parser::Document to the Clang parser.

Alone it doesn't do anything new, but passing the whole document around allows each registered AST handler to insert multiple parser values (there will be a use case for this).

@Papierkorb
Copy link
Owner

there will be a use case for this

Which is?

@HertzDevil HertzDevil mentioned this pull request Aug 30, 2020
4 tasks
@HertzDevil
Copy link
Contributor Author

HertzDevil commented Aug 30, 2020

Nested anonymous types: #85

@Papierkorb
Copy link
Owner

Now I see where you're coming from. As I don't squash PRs could you update your PR with better commit titles? Thanks!

@HertzDevil
Copy link
Contributor Author

done

@@ -66,4 +68,11 @@ struct CopyPtr {
const T &operator*() const { return *this->ptr; }
};

// compatibility for C++11
template< typename T, typename... Args >
std::unique_ptr<T> make_unique(Args&&... args)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future I don't think we'll want to support C++11 compilers. When I started this I think I had C++14-ish in mind, I think it's safe nowadays to move on to C++17. This will also enable us to use std::variant and std::optional in certain places.

@Papierkorb Papierkorb merged commit 185aae3 into Papierkorb:master Sep 1, 2020
@Papierkorb
Copy link
Owner

Thanks! 👍

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.

None yet

2 participants