2020-08-16 20:11:56 -04:00
|
|
|
[
|
2024-01-06 15:05:50 +09:00
|
|
|
(program)
|
|
|
|
|
(fn)
|
|
|
|
|
(lambda)
|
|
|
|
|
(let)
|
|
|
|
|
(each)
|
|
|
|
|
(for)
|
|
|
|
|
(match)
|
2023-07-22 15:29:32 +02:00
|
|
|
] @local.scope
|
2020-08-16 20:11:56 -04:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
((list
|
|
|
|
|
.
|
|
|
|
|
(symbol) @_special) @local.scope
|
|
|
|
|
(#any-of? @_special "while" "if" "when" "do" "collect" "icollect" "accumulate"))
|
2021-09-10 03:49:35 +03:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(fn
|
|
|
|
|
name: (symbol) @local.definition.function
|
2022-03-10 20:52:39 -06:00
|
|
|
(#set! definition.function.scope "parent"))
|
2024-01-06 15:05:50 +09:00
|
|
|
|
|
|
|
|
(lambda
|
|
|
|
|
name: (symbol) @local.definition.function
|
2022-03-10 20:52:39 -06:00
|
|
|
(#set! definition.function.scope "parent"))
|
2021-09-10 03:49:35 +03:00
|
|
|
|
2023-07-22 15:29:32 +02:00
|
|
|
; TODO: use @local.definition.parameter for parameters
|
2024-01-06 15:05:50 +09:00
|
|
|
(binding
|
|
|
|
|
(symbol) @local.definition.var)
|
|
|
|
|
|
|
|
|
|
(for_clause
|
|
|
|
|
.
|
|
|
|
|
(symbol) @local.definition.var)
|
2021-09-10 03:49:35 +03:00
|
|
|
|
2023-07-22 15:29:32 +02:00
|
|
|
(symbol) @local.reference
|