2024-01-06 15:05:50 +09:00
|
|
|
; Variables
|
2022-12-03 11:42:07 +01:00
|
|
|
(assignment
|
2023-07-22 15:29:32 +02:00
|
|
|
(identifier) @local.definition.var)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-12-03 11:42:07 +01:00
|
|
|
(assignment
|
2022-11-02 16:21:44 -05:00
|
|
|
(tuple_expression
|
2023-07-22 15:29:32 +02:00
|
|
|
(identifier) @local.definition.var))
|
2022-11-02 16:21:44 -05:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
; let/const bindings
|
2022-12-03 11:42:07 +01:00
|
|
|
(let_binding
|
2024-01-06 15:05:50 +09:00
|
|
|
(identifier) @local.definition.var)
|
2022-11-02 16:21:44 -05:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(let_binding
|
|
|
|
|
(tuple_expression
|
|
|
|
|
(identifier) @local.definition.var))
|
2022-11-02 16:21:44 -05:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
; For bindings
|
2020-11-09 20:05:34 +01:00
|
|
|
(for_binding
|
2023-07-22 15:29:32 +02:00
|
|
|
(identifier) @local.definition.var)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2020-11-09 20:05:34 +01:00
|
|
|
(for_binding
|
2022-11-02 16:21:44 -05:00
|
|
|
(tuple_expression
|
2023-07-22 15:29:32 +02:00
|
|
|
(identifier) @local.definition.var))
|
2020-11-09 20:05:34 +01:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
; Types
|
2020-11-09 20:05:34 +01:00
|
|
|
(struct_definition
|
2023-07-22 15:29:32 +02:00
|
|
|
name: (identifier) @local.definition.type)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-11-02 16:21:44 -05:00
|
|
|
(abstract_definition
|
2023-07-22 15:29:32 +02:00
|
|
|
name: (identifier) @local.definition.type)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-11-02 16:21:44 -05:00
|
|
|
(abstract_definition
|
2023-07-22 15:29:32 +02:00
|
|
|
name: (identifier) @local.definition.type)
|
2022-11-02 16:21:44 -05:00
|
|
|
|
|
|
|
|
(type_parameter_list
|
2023-07-22 15:29:32 +02:00
|
|
|
(identifier) @local.definition.type)
|
2022-11-02 16:21:44 -05:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
; Module imports
|
2022-11-02 16:21:44 -05:00
|
|
|
(import_statement
|
2023-07-22 15:29:32 +02:00
|
|
|
(identifier) @local.definition.import)
|
2022-11-02 16:21:44 -05:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
; Function/macro definitions
|
2020-11-09 20:05:34 +01:00
|
|
|
(function_definition
|
2024-04-14 07:23:46 -05:00
|
|
|
(signature
|
|
|
|
|
(call_expression
|
|
|
|
|
.
|
|
|
|
|
(identifier) @local.definition.function))) @local.scope
|
2024-01-06 15:05:50 +09:00
|
|
|
|
|
|
|
|
(macro_definition
|
2024-04-14 07:23:46 -05:00
|
|
|
(signature
|
|
|
|
|
(call_expression
|
|
|
|
|
.
|
|
|
|
|
(identifier) @local.definition.function))) @local.scope
|
2020-11-09 20:05:34 +01:00
|
|
|
|
2023-07-22 15:29:32 +02:00
|
|
|
(identifier) @local.reference
|
2020-11-09 20:05:34 +01:00
|
|
|
|
|
|
|
|
[
|
2022-11-02 16:21:44 -05:00
|
|
|
(for_statement)
|
|
|
|
|
(while_statement)
|
2020-11-09 20:05:34 +01:00
|
|
|
(try_statement)
|
2022-11-02 16:21:44 -05:00
|
|
|
(catch_clause)
|
2020-11-09 20:05:34 +01:00
|
|
|
(finally_clause)
|
|
|
|
|
(let_statement)
|
2022-11-02 16:21:44 -05:00
|
|
|
(quote_statement)
|
|
|
|
|
(do_clause)
|
2023-07-22 15:29:32 +02:00
|
|
|
] @local.scope
|