mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix(rust): update queries to breaking changes
* `if_let_expression` was removed in https://github.com/tree-sitter/tree-sitter-rust/pull/152 * `attributes` were reworked in https://github.com/tree-sitter/tree-sitter-rust/pull/163 (no more `meta-item`)
This commit is contained in:
parent
c563abe928
commit
dd89cafd2b
3 changed files with 7 additions and 9 deletions
|
|
@ -14,7 +14,6 @@
|
|||
(for_expression)
|
||||
(while_expression)
|
||||
(if_expression)
|
||||
(if_let_expression)
|
||||
(match_expression)
|
||||
(call_expression)
|
||||
|
||||
|
|
|
|||
|
|
@ -121,14 +121,14 @@
|
|||
(macro_definition "macro_rules!" @function.macro)
|
||||
|
||||
;; Attribute macros
|
||||
(attribute_item (meta_item (identifier) @function.macro))
|
||||
(meta_item (scoped_identifier (identifier) @function.macro .))
|
||||
(attribute_item (attribute (identifier) @function.macro))
|
||||
(attribute (scoped_identifier (identifier) @function.macro .))
|
||||
|
||||
;; Derive macros (assume all arguments are types)
|
||||
(meta_item
|
||||
(identifier) @_name
|
||||
arguments: (meta_arguments (meta_item (identifier) @type))
|
||||
(#eq? @_name "derive"))
|
||||
; (attribute
|
||||
; (identifier) @_name
|
||||
; arguments: (attribute (attribute (identifier) @type))
|
||||
; (#eq? @_name "derive"))
|
||||
|
||||
;; Function-like macros
|
||||
(macro_invocation
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
(tuple_pattern
|
||||
(identifier) @definition.var)
|
||||
|
||||
(if_let_expression
|
||||
(let_condition
|
||||
pattern: (_
|
||||
(identifier) @definition.var))
|
||||
|
||||
|
|
@ -93,7 +93,6 @@
|
|||
(for_expression)
|
||||
(loop_expression)
|
||||
(if_expression)
|
||||
(if_let_expression)
|
||||
(match_expression)
|
||||
(match_arm)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue