feat(locals)!: switch to upstream captures

This commit is contained in:
Christian Clason 2023-07-22 15:29:32 +02:00
parent 306367a7f4
commit 8fb218dbfd
95 changed files with 1154 additions and 1154 deletions

View file

@ -1,37 +1,37 @@
; Scopes
;-------
(statement_block) @scope
(function) @scope
(arrow_function) @scope
(function_declaration) @scope
(method_definition) @scope
(for_statement) @scope
(for_in_statement) @scope
(catch_clause) @scope
(statement_block) @local.scope
(function) @local.scope
(arrow_function) @local.scope
(function_declaration) @local.scope
(method_definition) @local.scope
(for_statement) @local.scope
(for_in_statement) @local.scope
(catch_clause) @local.scope
; Definitions
;------------
(variable_declarator
name: (identifier) @definition.var)
name: (identifier) @local.definition.var)
(import_specifier
(identifier) @definition.import)
(identifier) @local.definition.import)
(namespace_import
(identifier) @definition.import)
(identifier) @local.definition.import)
(function_declaration
((identifier) @definition.function)
((identifier) @local.definition.function)
(#set! definition.var.scope parent))
(method_definition
((property_identifier) @definition.function)
((property_identifier) @local.definition.function)
(#set! definition.var.scope parent))
; References
;------------
(identifier) @reference
(shorthand_property_identifier) @reference
(identifier) @local.reference
(shorthand_property_identifier) @local.reference