summaryrefslogtreecommitdiff
path: root/runtime/queries/tact/locals.scm
blob: f1b3e8de5fd04e5e3e103bfef9e3d2b81a92ed3b (plain) (blame)
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
31
32
33
34
35
; See: https://tree-sitter.github.io/tree-sitter/syntax-highlighting#local-variables

; Scopes       @local.scope
; -------------------------

[
  (static_function)
  (init_function)
  (bounced_function)
  (receive_function)
  (external_function)
  (function)
  (block_statement)
] @local.scope

; Definitions  @local.definition
; ------------------------------

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

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

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

; References   @local.reference
; -----------------------------

(self) @local.reference

(value_expression (identifier) @local.reference)

(lvalue (identifier) @local.reference)