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

Question: use tree-sitter-cpp all the time? #15

Closed
genotrance opened this issue Nov 22, 2018 · 3 comments
Closed

Question: use tree-sitter-cpp all the time? #15

genotrance opened this issue Nov 22, 2018 · 3 comments

Comments

@genotrance
Copy link

genotrance commented Nov 22, 2018

I'm assuming tree-sitter-cpp is a superset of everything in tree-sitter-c. Is there any issues with using tree-sitter-cpp on C files as well?

This will avoid a bunch of flags, detection and what not in nimterop.

Thank you.

@timotheecour
Copy link

one issue with that approach is it won't detect illegal C things that is legal C++ thing

@genotrance
Copy link
Author

I'm not certain if tree-sitter actually handles that scenario. Will be great if @maxbrunsfeld could comment on this.

@maxbrunsfeld
Copy link
Contributor

maxbrunsfeld commented Mar 5, 2019

Certain C constructs are removed from the C++ parser, like the auto storage class specifier, and parsing of function-like macros that evaluate to a type (because that's not a common idiom in C++ since C++ has templates).

Those things might not matter to you though; they're pretty minor. 🤷‍♂️

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

No branches or pull requests

3 participants