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-python
Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)
No response
Describe the bug
If an expression is split into 2 lines without a backslash and not after a comma, and the second line is de-indented making it go outside of the instruction block (outside of an if, for example), the parser thinks there is an error, while python correctly interprets it.
Example of minimal code :
ifTrue:
print(1+1)
But it also works with a multiplication star or any operator before the split.
It also works with a subscript statement, or any parenthesized which can be split as we want, according to Python.
And it also works inside a loop or any statement with an indented block.
It may works with other syntactic exceptions, but I can't find a more general pattern.
Did you check existing issues?
Tree-Sitter CLI Version, if relevant (output of
tree-sitter --version
)No response
Describe the bug
If an expression is split into 2 lines without a backslash and not after a comma, and the second line is de-indented making it go outside of the instruction block (outside of an if, for example), the parser thinks there is an error, while python correctly interprets it.
Example of minimal code :
But it also works with a multiplication star or any operator before the split.
It also works with a subscript statement, or any parenthesized which can be split as we want, according to Python.
And it also works inside a loop or any statement with an indented block.
It may works with other syntactic exceptions, but I can't find a more general pattern.
Steps To Reproduce/Bad Parse Tree
This produce the following error :
Expected Behavior/Parse Tree
Repro
The text was updated successfully, but these errors were encountered: