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
I have read all the tree-sitter docs if it relates to using the parser
I have searched the existing issues of tree-sitter-cpp
Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)
No response
Describe the bug
Pointer variables declared using direct initialization (e.g., int x(10);) are either represented in the parse tree incorrectly or result in a tree parsing error. After some experimentation, it appears that only primitive pointer type variables declared in this manner produce the error. It looks as though non-primitive pointer type variables result in expression_statement tree types rather than declaration tree types.
Additionally, both pointer and non-pointer type variables that are declared with direct initialization produce incorrect function_declarator tree fields.
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
)No response
Describe the bug
Pointer variables declared using direct initialization (e.g.,
int x(10);
) are either represented in the parse tree incorrectly or result in a tree parsing error. After some experimentation, it appears that only primitive pointer type variables declared in this manner produce the error. It looks as though non-primitive pointer type variables result inexpression_statement
tree types rather thandeclaration
tree types.Additionally, both pointer and non-pointer type variables that are declared with direct initialization produce incorrect
function_declarator
tree fields.Steps To Reproduce/Bad Parse Tree
If you parse the following program:
You get the following parse tree:
Expected Behavior/Parse Tree
Repro
// see above
The text was updated successfully, but these errors were encountered: