Problem: These patterns were impossible, since children need to be children of
every subtype of a supertype to be captured in this way. As subtypes
could appear as children themselves, the query code silently "skipped
over" the supertype restriction in the pattern. This was fixed in
tree-sitter v0.26.0, which now (correctly) flags these patterns as
"impossible".
Solution: Add the appropriate child nodes explicitly.
Problem: These patterns were impossible, since children need to be children of
every subtype of a supertype to be captured in this way. As subtypes
could appear as children themselves, the query code silently "skipped
over" the supertype restriction in the pattern. This was fixed in
tree-sitter v0.26.0, which now (correctly) flags these patterns as
"impossible".
Solution: Add the appropriate child nodes explicitly.
The source of truth for formatting (according to make formatquery and
CI) is now ts_query_ls, so remove the no longer required script to
prevent divergence and bitrotting.
`trace32_hll_variable` has been removed from the grammar. The
queries are now capturing `symbol` instead. `symbol` is highlighted
as variable or constant.
This change does not break existing injections that currently ship with nvim-treesitter, but instead allows additional injections to be defined by users, like those found in the Max/MSP Jitter XML Shader format.
* supported parsers _must_ commit at least `grammar.json`
* set `TREE_SITTER_JS_RUNTIME=native` when generating parser to use
built-in quickjs instead of node (requires tree-sitter 0.26)
Apex codebases commonly use Javadoc-style comments, similar to Java (Apex is Salesforce's object-oriented language).
This updates the injection query to capture javadoc nodes instead of the generic comment for better highlighting and parsing accuracy.
Some queries don't add a colon after the `inherits` keyword, which nvim
could handle but `ts_query_ls` could not, causing it to give incomplete
diagnostics.
Breaking changes:
- Node `(variable)` was renamed to `(expr_double_quotes)`.
- Node `(variable_raw)` was renamed to `(expr_single_quotes)`.
- Node `(string)` was renamed to `(str_double_quotes)`.
- Node `(raw_string)` was renamed to `(str_single_quotes)`.
- Node `(raw_string_quote)` was removed.
Commit 9d7ed4 of the Inko tree-sitter grammar introduces support for
pattern matching in `let` expressions. This requires some corresponding
changes to the "local" queries to correctly define local variables. This
is done by simply defining locals for all "identifier_pattern" nodes,
instead of only doing this for "define_variable" nodes.