It looks like tree-sitter is parsing the class body as a field definition and a separate method definition, whereas it should be parsing it as a single (static getter) method definition
I don't know much about the semicolon-insertion rules in JS or whatever but it would seem likely that this is related to that?
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/MYGwhgzhAECC0G8BQ1oQC5nQS2NA5gKborQBmA9hQBQCUi0ATsQK6MB20AjANzQC+SfkA
The output of
tree-sitter parse
is the following:It looks like tree-sitter is parsing the class body as a field definition and a separate method definition, whereas it should be parsing it as a single (static getter) method definition
I don't know much about the semicolon-insertion rules in JS or whatever but it would seem likely that this is related to that?