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