Closed vird closed 3 months ago
The following piece of code is valid but it is parsed incorrectly:
if (n-->0){}
Here's a link to the TypeScript Playground showing that the snippet above is valid JavaScript or TypeScript:
https://www.typescriptlang.org/play?#code/JYMwBAFAdgtDB8AGAlAbwL5A
The output of tree-sitter parse is the following:
tree-sitter parse
> tree-sitter-javascript@0.20.1 parse > tree-sitter parse 2.js (program [0, 0] - [1, 0] (ERROR [0, 0] - [0, 5] (identifier [0, 4] - [0, 5])) (comment [0, 5] - [0, 12])) 2.js 0 ms (ERROR [0, 0] - [0, 5])
Thanks for your bug reports! These have been fixed now, let me know of other issues you run into
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/JYMwBAFAdgtDB8AGAlAbwL5A
The output of
tree-sitter parse
is the following: