blob: 61cab2309b0ac41f3684a1fc57de12b8df94a16d (
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
|
; let bindings
(let_expression
(binding_set
(binding
.
(attrpath) @local.definition.var))) @local.scope
; rec attrsets
(rec_attrset_expression
(binding_set
(binding
.
(attrpath) @local.definition.field))) @local.scope
; functions and parameters
(function_expression
.
[
(identifier) @local.definition.parameter
(formals
(formal
.
(identifier) @local.definition.parameter))
]) @local.scope
((formals)
"@"
(identifier) @local.definition.parameter) ; I couldn't get this to work properly inside the (function)
(variable_expression
(identifier) @local.reference)
(inherited_attrs
attr: (identifier) @local.reference)
|