We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
tree-sitter --version
0.23.1
When using typeof inside parameter declaration it leads to error nodes
declaration [0, 0] - [0, 41] type_qualifier [0, 0] - [0, 5] type: type_identifier [0, 6] - [0, 12] declarator: parenthesized_declarator [0, 12] - [0, 38] parenthesized_declarator [0, 14] - [0, 29] parenthesized_declarator [0, 15] - [0, 27] identifier [0, 16] - [0, 22] ERROR [0, 23] - [0, 26] identifier [0, 23] - [0, 24] ERROR [0, 27] - [0, 28] number_literal [0, 27] - [0, 28] ERROR [0, 29] - [0, 36] identifier [0, 31] - [0, 36] ERROR [0, 39] - [0, 40]
The below code is compilable but leads to misparsing with error nodes in treesitter.
struct X{ int _head; }; int main() { const typeof( ((struct X *)0)->_head ) x; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Did you check existing issues?
Tree-Sitter CLI Version, if relevant (output of
tree-sitter --version
)0.23.1
Describe the bug
When using typeof inside parameter declaration it leads to error nodes
Steps To Reproduce/Bad Parse Tree
declaration [0, 0] - [0, 41]
type_qualifier [0, 0] - [0, 5]
type: type_identifier [0, 6] - [0, 12]
declarator: parenthesized_declarator [0, 12] - [0, 38]
parenthesized_declarator [0, 14] - [0, 29]
parenthesized_declarator [0, 15] - [0, 27]
identifier [0, 16] - [0, 22]
ERROR [0, 23] - [0, 26]
identifier [0, 23] - [0, 24]
ERROR [0, 27] - [0, 28]
number_literal [0, 27] - [0, 28]
ERROR [0, 29] - [0, 36]
identifier [0, 31] - [0, 36]
ERROR [0, 39] - [0, 40]
Expected Behavior/Parse Tree
The below code is compilable but leads to misparsing with error nodes in treesitter.
Repro
The text was updated successfully, but these errors were encountered: