tree-sitter-javascript
tree-sitter-javascript copied to clipboard
Regexp Lookbehind does not parse
The following piece of code is valid but it is parsed incorrectly:
/(?<=u)@/;
Here's a link to the TypeScript Playground showing that the snippet above is valid JavaScript or TypeScript:
https://www.typescriptlang.org/play?#code/PQCg-APAvArglAAWEA
The issue template asked me to run tree-sitter parse
, but after 15 minutes of fiddling with it and googling i couldn't figure out how to install the js parser. Nonetheless, here's the output of neovim's :TSPlaygroundToggle
expression_statement [0, 0] - [0, 11]
regex [0, 0] - [0, 10]
pattern: regex_pattern [0, 1] - [0, 9]
term [0, 1] - [0, 9]
pattern_character [0, 1] - [0, 2]
ERROR [0, 2] - [0, 8]
pattern_character [0, 6] - [0, 7]
pattern_character [0, 8] - [0, 9]
![Screen Shot 2022-02-22 at 0 46 22](https://user-images.githubusercontent.com/1466420/155070865-f414b8a8-b6e7-4083-b968-dbe22ef7348e.png)
See https://github.com/tree-sitter/tree-sitter-regex/issues/13