2021-09-06 11:13:52 +02:00
|
|
|
; Scopes
|
|
|
|
|
2023-11-06 02:54:25 +01:00
|
|
|
[
|
|
|
|
(function_declaration)
|
|
|
|
(type_declaration)
|
|
|
|
(block)
|
|
|
|
] @local.scope
|
2021-09-06 11:13:52 +02:00
|
|
|
|
|
|
|
; Definitions
|
|
|
|
|
2023-11-06 02:54:25 +01:00
|
|
|
(type_parameter_list
|
|
|
|
(parameter_declaration
|
|
|
|
name: (identifier) @local.definition))
|
|
|
|
|
2021-09-06 11:13:52 +02: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 06:53:04 +02:00
|
|
|
(identifier) @local.definition)
|
2021-09-06 11:13:52 +02: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 02:54:25 +01:00
|
|
|
(type_identifier) @local.reference
|