Closed SunBK201 closed 3 weeks ago
I’ve also meet this problem, How can we make the parser in pypi consistent with the one in playground?
@amaanq Does pypi tree-sitter-c use tree-sitter-cpp parser?
no, and the latest version does not have this issue
Did you check existing issues?
Tree-Sitter CLI Version, if relevant (output of
tree-sitter --version
)No response
Describe the bug
I found that the output of tree-sitter-c is inconsistent with that of playground c. Just like https://github.com/tree-sitter/tree-sitter/issues/3449.
I use pypi https://pypi.org/project/tree-sitter-c to parse the C code. There is an error node, but there is no such error node in the playground:
In addition, I found that the parsing error of using pypi https://pypi.org/project/tree-sitter-c is consistent with the parsing error of using pypi https://pypi.org/project/tree-sitter-cpp. Does this mean that tree-sitter-c and tree-sitter-cpp in pypi use the cpp parser at the same time?
Steps To Reproduce/Bad Parse Tree
ERROR NODE:
,
(behindnew
)Expected Behavior/Parse Tree
This code should have no error nodes in tree-sitter-c.
Repro