Unnamed repository; edit this file 'description' to name the repository.
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
; Scopes
[
 (block)
 (class_declaration)
 (interface_declaration)
 (function_declaration)
 (switch_expression)
] @local.scope

; Definitions
(function_arg name: (identifier) @local.definition.variable.parameter)
(variable_declaration name: (identifier) @local.definition.variable)

; References
(identifier) @local.reference

; The `member` side of `a.b` is field access, not a variable reference.
(member_expression
  member: (identifier) @_)
; A bare-identifier callee is a function/method name, not a variable reference
; (matches the `@function` baseline in highlights.scm).
(call_expression
  object: (identifier) @_)
; Type names are type references, not value references.
(type
  type_name: (identifier) @_)
(type
  built_in: (identifier) @_)