-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
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
<const> expression fails to parse (when JSX is disabled) #260
Labels
Comments
I narrowed the cause to the addition of this rule, perhaps it messes up with token precedence
Without it <const> is parsed properly, but Functions with typed parameters test fails.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following piece of code is valid (when JSX is disabled) but it is parsed incorrectly:
Here's a link to the TypeScript Playground showing that the snippet above is valid JavaScript or TypeScript:
https://www.typescriptlang.org/play?target=99&jsx=0&ts=5.2.2&ssl=1&ssc=33&pln=1&pc=1#code/MYewdgzgLgBAHjAvDAPKSUB8BvGBDALhgEYAaGAIyICYYBfAbiA
The output of
tree-sitter parse
is the following: (I copied this from the TS playground in nvim, I assume it's the same thing? Let me know if not and I'll figure out how to use thetree-sitter
binary)I bisected the change and #252 seems to have introduced the bug. Prior to that PR, the code is parsed as
Thanks!
The text was updated successfully, but these errors were encountered: