2022-08-22 18:13:21 +02:00
|
|
|
; -----------
|
|
|
|
; Definitions
|
|
|
|
; -----------
|
2021-07-04 14:24:33 +02:00
|
|
|
|
2022-08-22 18:13:21 +02:00
|
|
|
; Imports
|
2021-07-04 14:24:33 +02:00
|
|
|
(import_statement
|
2022-08-22 18:13:21 +02:00
|
|
|
(identifier) @local.definition)
|
|
|
|
|
|
|
|
; Constants
|
|
|
|
(const_statement
|
|
|
|
(variable_declaration
|
|
|
|
. (identifier) @local.definition))
|
2021-07-04 14:24:33 +02:00
|
|
|
|
2022-08-22 18:13:21 +02:00
|
|
|
; Parameters
|
2021-07-04 14:24:33 +02:00
|
|
|
(parameter_list
|
2022-08-22 18:13:21 +02:00
|
|
|
(identifier) @local.definition)
|
|
|
|
|
2021-07-04 14:24:33 +02:00
|
|
|
(typed_parameter
|
2022-08-22 18:13:21 +02:00
|
|
|
. (identifier) @local.definition)
|
2021-07-04 14:24:33 +02:00
|
|
|
|
2022-08-22 18:13:21 +02:00
|
|
|
(optional_parameter .
|
|
|
|
(identifier) @local.definition)
|
2021-07-04 14:24:33 +02:00
|
|
|
|
2022-11-05 19:30:40 +01:00
|
|
|
(slurp_parameter
|
2022-08-22 18:13:21 +02:00
|
|
|
(identifier) @local.definition)
|
|
|
|
|
|
|
|
(function_expression
|
|
|
|
. (identifier) @local.definition)
|
|
|
|
|
|
|
|
; ------
|
|
|
|
; Scopes
|
|
|
|
; ------
|
2021-07-04 14:24:33 +02:00
|
|
|
|
|
|
|
[
|
2022-08-22 18:13:21 +02:00
|
|
|
(function_definition)
|
2022-11-05 19:30:40 +01:00
|
|
|
(short_function_definition)
|
2022-08-22 18:13:21 +02:00
|
|
|
(macro_definition)
|
2021-12-17 08:54:18 +01:00
|
|
|
] @local.scope
|
2022-08-22 18:13:21 +02:00
|
|
|
|
|
|
|
; ----------
|
|
|
|
; References
|
|
|
|
; ----------
|
|
|
|
|
|
|
|
(identifier) @local.reference
|