2020-11-18 16:52:41 -05:00
|
|
|
; let bindings
|
2024-01-06 15:05:50 +09:00
|
|
|
(let_expression
|
|
|
|
|
(binding_set
|
|
|
|
|
(binding
|
|
|
|
|
.
|
|
|
|
|
(attrpath) @local.definition.var))) @local.scope
|
2020-11-18 16:52:41 -05:00
|
|
|
|
|
|
|
|
; rec attrsets
|
2024-01-06 15:05:50 +09:00
|
|
|
(rec_attrset_expression
|
|
|
|
|
(binding_set
|
|
|
|
|
(binding
|
|
|
|
|
.
|
|
|
|
|
(attrpath) @local.definition.field))) @local.scope
|
2020-11-18 16:52:41 -05:00
|
|
|
|
|
|
|
|
; functions and parameters
|
2024-01-06 15:05:50 +09:00
|
|
|
(function_expression
|
|
|
|
|
.
|
|
|
|
|
[
|
2023-07-22 15:29:32 +02:00
|
|
|
(identifier) @local.definition.parameter
|
2024-01-06 15:05:50 +09:00
|
|
|
(formals
|
|
|
|
|
(formal
|
|
|
|
|
.
|
|
|
|
|
(identifier) @local.definition.parameter))
|
|
|
|
|
]) @local.scope
|
2020-11-18 16:52:41 -05:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
((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)
|