| 1 |
|
| 2 |
|
| 3 |
[ |
| 4 |
(function_declaration) |
| 5 |
(method_declaration) |
| 6 |
(func_literal) |
| 7 |
(type_declaration) |
| 8 |
(block) |
| 9 |
] @local.scope |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
(parameter_declaration (identifier) @local.definition.variable.parameter) |
| 14 |
(variadic_parameter_declaration (identifier) @local.definition.variable.parameter) |
| 15 |
|
| 16 |
(const_declaration |
| 17 |
(const_spec |
| 18 |
name: (identifier) @local.definition.constant)) |
| 19 |
|
| 20 |
(var_spec |
| 21 |
name: (identifier) @local.definition.variable) |
| 22 |
|
| 23 |
(short_var_declaration |
| 24 |
left: (expression_list (identifier) @local.definition.variable)) |
| 25 |
|
| 26 |
(range_clause |
| 27 |
left: (expression_list (identifier) @local.definition.variable)) |
| 28 |
|
| 29 |
|
| 30 |
(type_switch_statement |
| 31 |
alias: (expression_list (identifier) @local.definition.variable)) |
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
(identifier) @local.reference |
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
(keyed_element . (literal_element (identifier) @_)) |