You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When parsing code that uses function annotations, the parse tree incorrectly reports an ERROR node.
For example, given the following snippet that contains a function annotated with EXPORT:
I would think that this is not an issue with the tree-sitter grammar, because the grammar only describes a well-formed piece of source code. Because there is preprocessing required to yield well-formed source code here, there is no issue.
The correct course of action would be to take this code:
Activity
eezstreet commentedon Jun 2, 2025
I would think that this is not an issue with the
tree-sittergrammar, because the grammar only describes a well-formed piece of source code. Because there is preprocessing required to yield well-formed source code here, there is no issue.The correct course of action would be to take this code:
And do a substitution of the preprocessor macro:
If that yields an error, then there is a problem. At least in my humble opinion anyway. :)