[X] I have read all the tree-sitter docs if it relates to using the parser
[X] I have searched the existing issues of tree-sitter-c
Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)
0.22.3
Describe the bug
Treesitter incorrectly parses this expression, although it is valid legal code.
char* x =({char* y = malloc(10); strcpy(y,"aaaaa");});
It follows the coding construct described here:
https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html
Steps To Reproduce/Bad Parse Tree
The code that treesitter cant parse correctly:
int main(){
char* x =({char* y = malloc(10); strcpy(y,"aaaaa");});
return 0;
}
Expected Behavior/Parse Tree
The ({ characters should be in a new node and following compund statements as children of that node
Repro
int main(){
char* x =({char* y = malloc(10); strcpy(y,"aaaaa");});
return 0;
}
Did you check existing issues?
Tree-Sitter CLI Version, if relevant (output of
tree-sitter --version
)0.22.3
Describe the bug
Treesitter incorrectly parses this expression, although it is valid legal code.
char* x =({char* y = malloc(10); strcpy(y,"aaaaa");});
It follows the coding construct described here: https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.htmlSteps To Reproduce/Bad Parse Tree
The code that treesitter cant parse correctly:
Expected Behavior/Parse Tree
The
({
characters should be in a new node and following compund statements as children of that nodeRepro