aboutsummaryrefslogtreecommitdiff
path: root/helix-22.03-x86_64-windows/runtime/queries/go/locals.scm
blob: d240e2b78874ef27dc9c60c7387bd9f6423d2b4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
; Scopes

(block) @local.scope

; Definitions

(parameter_declaration (identifier) @local.definition)
(variadic_parameter_declaration (identifier) @local.definition)

(short_var_declaration
  left: (expression_list
          (identifier) @local.definition))

(var_spec
  name: (identifier) @local.definition)

(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