2022-08-23 00:13:21 +08:00
|
|
|
; -----------
|
|
|
|
; Definitions
|
|
|
|
; -----------
|
2021-07-04 20:24:33 +08:00
|
|
|
|
2022-08-23 00:13:21 +08:00
|
|
|
; Constants
|
|
|
|
(const_statement
|
2025-02-03 08:17:10 +08:00
|
|
|
(assignment
|
2025-02-25 01:46:34 +08:00
|
|
|
. (identifier) @local.definition.constant))
|
2025-02-03 08:17:10 +08:00
|
|
|
|
2022-08-23 00:13:21 +08:00
|
|
|
; Parameters
|
2021-07-04 20:24:33 +08:00
|
|
|
(parameter_list
|
2025-02-25 01:46:34 +08:00
|
|
|
(identifier) @local.definition.variable.parameter)
|
2022-08-23 00:13:21 +08:00
|
|
|
|
2025-02-03 08:17:10 +08:00
|
|
|
(optional_parameter
|
|
|
|
.
|
2025-02-25 01:46:34 +08:00
|
|
|
(identifier) @local.definition.variable.parameter)
|
2021-07-04 20:24:33 +08:00
|
|
|
|
2022-11-06 02:30:40 +08:00
|
|
|
(slurp_parameter
|
2025-02-25 01:46:34 +08:00
|
|
|
(identifier) @local.definition.variable.parameter)
|
2022-08-23 00:13:21 +08:00
|
|
|
|
2025-02-03 08:17:10 +08:00
|
|
|
(typed_parameter
|
2025-02-25 01:46:34 +08:00
|
|
|
parameter: (identifier) @local.definition.variable.parameter
|
2025-02-03 08:17:10 +08:00
|
|
|
(_))
|
|
|
|
|
|
|
|
; Single parameter arrow function
|
2022-08-23 00:13:21 +08:00
|
|
|
(function_expression
|
2025-02-03 08:17:10 +08:00
|
|
|
.
|
2025-02-25 01:46:34 +08:00
|
|
|
(identifier) @local.definition.variable.parameter)
|
2022-08-23 00:13:21 +08:00
|
|
|
|
|
|
|
; ----------
|
|
|
|
; References
|
|
|
|
; ----------
|
|
|
|
|
|
|
|
(identifier) @local.reference
|
2025-02-03 08:17:10 +08:00
|
|
|
|
|
|
|
; ------
|
|
|
|
; Scopes
|
|
|
|
; ------
|
|
|
|
|
|
|
|
[
|
|
|
|
(for_statement)
|
|
|
|
(while_statement)
|
|
|
|
(try_statement)
|
|
|
|
(catch_clause)
|
|
|
|
(finally_clause)
|
|
|
|
(let_statement)
|
|
|
|
(quote_statement)
|
|
|
|
(do_clause)
|
2025-02-25 01:46:34 +08:00
|
|
|
(function_definition)
|
|
|
|
(short_function_definition)
|
|
|
|
(macro_definition)
|
2025-02-03 08:17:10 +08:00
|
|
|
] @local.scope
|
|
|
|
|