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
tree-sitter parses the TypeScript non-null assertion operator ! with incorrect precedence. The TypeScript compiler parses ! with precedence higher than new, but tree-sitter incorrectly parses it with precedence lower than || and ??.
For example, a && b! should be equivalent to a && (b!), not (a && b)!.
Did you check existing issues?
Tree-Sitter CLI Version, if relevant (output of
tree-sitter --version
)tree-sitter 0.22.6 (b40f342067a89cd6331bf4c27407588320f3c263)
Describe the bug
tree-sitter parses the TypeScript non-null assertion operator
!
with incorrect precedence. The TypeScript compiler parses!
with precedence higher thannew
, but tree-sitter incorrectly parses it with precedence lower than||
and??
.For example,
a && b!
should be equivalent toa && (b!)
, not(a && b)!
.Steps To Reproduce/Bad Parse Tree
Expected Behavior/Parse Tree
Repro
No response
The text was updated successfully, but these errors were encountered: