aboutsummaryrefslogblamecommitdiff
path: root/runtime/queries/go/locals.scm
blob: aae562571f5ac74e35851322ee3f02f8827d7000 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14












                                                               
                                 













                                            
; 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
  (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