mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
fix(yuck): improper use of supertypes in queries
Problem: `(ast_block)` is a supertype, of which `(symbol)` (among others) is a subtype, which makes the final local pattern invalid. (This was not noticed before because the parser is stuck at ABI 14 due to a missing `tree-sitter.json`.) Solution: Fix the pattern and use supertype where appropriate.
This commit is contained in:
parent
81295eb0c5
commit
2098db61dc
3 changed files with 2 additions and 9 deletions
|
|
@ -2654,7 +2654,7 @@ return {
|
||||||
},
|
},
|
||||||
yuck = {
|
yuck = {
|
||||||
install_info = {
|
install_info = {
|
||||||
revision = 'e877f6ade4b77d5ef8787075141053631ba12318',
|
revision = '6c60112b3b3e739fb1ca4a8ea4bea2b6ffe11318',
|
||||||
url = 'https://github.com/tree-sitter-grammars/tree-sitter-yuck',
|
url = 'https://github.com/tree-sitter-grammars/tree-sitter-yuck',
|
||||||
},
|
},
|
||||||
maintainers = { '@Philipp-M', '@amaanq' },
|
maintainers = { '@Philipp-M', '@amaanq' },
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
[
|
[
|
||||||
(ast_block)
|
(ast_block)
|
||||||
(array)
|
|
||||||
(expr)
|
|
||||||
(json_array)
|
(json_array)
|
||||||
(json_object)
|
(json_object)
|
||||||
(parenthesized_expression)
|
(parenthesized_expression)
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
[
|
[
|
||||||
(ast_block)
|
(ast_block)
|
||||||
(list)
|
|
||||||
(array)
|
|
||||||
(expr)
|
|
||||||
(json_array)
|
(json_array)
|
||||||
(json_object)
|
(json_object)
|
||||||
(parenthesized_expression)
|
(parenthesized_expression)
|
||||||
|
|
@ -16,6 +13,4 @@
|
||||||
(simplexpr
|
(simplexpr
|
||||||
(ident) @local.definition.field))
|
(ident) @local.definition.field))
|
||||||
|
|
||||||
(ast_block
|
(symbol) @local.definition.type
|
||||||
(symbol)
|
|
||||||
(ident) @local.definition.type)
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue