mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-20 12:20:02 -04:00
feat(smali): improve queries
This commit is contained in:
parent
c9d7f9c920
commit
8c4a22fd50
7 changed files with 191 additions and 36 deletions
43
queries/smali/locals.scm
Normal file
43
queries/smali/locals.scm
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
[
|
||||
(class_directive)
|
||||
(expression)
|
||||
(annotation_directive)
|
||||
(array_data_directive)
|
||||
(method_definition)
|
||||
(packed_switch_directive)
|
||||
(sparse_switch_directive)
|
||||
(subannotation_directive)
|
||||
] @scope
|
||||
|
||||
[
|
||||
(identifier)
|
||||
(class_identifier)
|
||||
(call_site)
|
||||
(label)
|
||||
(jmp_label)
|
||||
] @reference
|
||||
|
||||
(enum_reference
|
||||
(field_identifier) @definition.enum)
|
||||
|
||||
((field_definition
|
||||
modifiers: (access_modifiers) @_mod
|
||||
(field_identifier) @definition.enum)
|
||||
(#eq? @_mod "enum"))
|
||||
|
||||
(field_definition
|
||||
(field_identifier) @definition.field
|
||||
(field_type) @definition.associated)
|
||||
|
||||
(annotation_key) @definition.field
|
||||
|
||||
(method_definition
|
||||
(method_signature (method_identifier) @definition.method))
|
||||
|
||||
(param_identifier) @definition.parameter
|
||||
|
||||
(annotation_directive
|
||||
(class_identifier) @definition.type)
|
||||
|
||||
(class_directive
|
||||
(class_identifier) @definition.type)
|
||||
Loading…
Add table
Add a link
Reference in a new issue