2021-09-06 13:13:52 +04:00
|
|
|
; Scopes
|
|
|
|
|
2023-11-06 05:54:25 +04:00
|
|
|
[
|
|
|
|
(function_declaration)
|
|
|
|
(type_declaration)
|
|
|
|
(block)
|
|
|
|
] @local.scope
|
2021-09-06 13:13:52 +04:00
|
|
|
|
|
|
|
; Definitions
|
|
|
|
|
2023-11-06 05:54:25 +04:00
|
|
|
(type_parameter_list
|
|
|
|
(parameter_declaration
|
|
|
|
name: (identifier) @local.definition))
|
|
|
|
|
2021-09-06 13:13:52 +04:00
|
|
|
(parameter_declaration (identifier) @local.definition)
|
|
|
|
(variadic_parameter_declaration (identifier) @local.definition)
|
|
|
|
|
|
|
|
(short_var_declaration
|
|
|
|
left: (expression_list
|
|
|
|
(identifier) @local.definition))
|
|
|
|
|
|
|
|
(var_spec
|
2023-04-15 08:53:04 +04:00
|
|
|
(identifier) @local.definition)
|
2021-09-06 13:13:52 +04:00
|
|
|
|
|
|
|
(for_statement
|
|
|
|
(range_clause
|
|
|
|
left: (expression_list
|
|
|
|
(identifier) @local.definition)))
|
|
|
|
|
|
|
|
(const_declaration
|
|
|
|
(const_spec
|
|
|
|
name: (identifier) @local.definition))
|
|
|
|
|
|
|
|
; References
|
|
|
|
|
|
|
|
(identifier) @local.reference
|
|
|
|
(field_identifier) @local.reference
|
2023-11-06 05:54:25 +04:00
|
|
|
(type_identifier) @local.reference
|