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:
Uh oh!
There was an error while loading. Please reload this page.
Did you check existing issues?
Tree-Sitter CLI Version, if relevant (output of
tree-sitter --version
)tree-sitter 0.25.3 (2a835ee029dca1c325e6f1c01dbce40396f6123e)
Describe the bug
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
:The following error appears in the parse tree:
(ERROR [3, 0] - [3, 4]
.Steps To Reproduce/Bad Parse Tree
tree-sitter parse
on the file.Expected Behavior/Parse Tree
The parse tree should not have errors.
Repro
The text was updated successfully, but these errors were encountered: