conditional_type
should use prec.right
instead of prec.left
.
#231
Labels
conditional_type
should use prec.right
instead of prec.left
.
#231
The following piece of code is valid 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?#code/C4TwDgpgBA4hwBVwQHIEMC2EA8CoQA9gIA7AEwGcoAjAe1oBsI0SAfKEgVw2ogCco7CsD4BLEgHMAfFAC8UAFBRlK1cryFi5KnUbMSUAPxQARLqYsTUAFyK19qBqKlKHbrwHGTXHvyu2lB1UTYTFJEwBuIA
This is the output from https://tree-sitter.github.io/tree-sitter/playground:
This is what the output should be:
This matches what the TypeScript parser is doing. I verified this using https://astexplorer.net.
The text was updated successfully, but these errors were encountered: