[STAL-2005] Update the javascript grammar
What problem are you trying to solve?
Being able to query for supertypes in the JS grammar, namely the statement node, so that we don't have to write an alternation of several possible child nodes of the statement node. This will help with the ESLint rule implementations
What is your solution?
In tree-sitter-javascript, the statement node was inlined as well as being a supertype, which doesn't make a lot of sense since inlining it will make it unqueryable. Supertyping a node has a similar effect that inlining does where a node is not present in the syntax tree, but it can still be queried for. This is especially useful in cases where the supertype contains a choice of children, such as the statement node, expression node, and others. Removing statement from the inline list in the grammar allows us to query for it again.
Alternatives considered
Hacky workaround with alternations (not fun)
What the reviewer should know
This just updates the JS grammar, however, I will update the TS/TSX grammar later today for this change as well. I also removed the cpp field since upstream has deprecated c++ scanners and no maintained grammar uses them anymore
Moving this to a draft for the time-being, as this change has unintended behavior regressions that we should review first.
Closing this for now. If relevant and/or needed for other tasks, please re-open now that we have better tooling for testing.