2021-02-02 18:58:07 +01:00
|
|
|
; Scopes
|
|
|
|
|
[
|
|
|
|
|
(function_call)
|
|
|
|
|
(code_block)
|
|
|
|
|
(function_block)
|
|
|
|
|
(control_structure)
|
2023-07-22 15:29:32 +02:00
|
|
|
] @local.scope
|
2021-02-02 18:58:07 +01:00
|
|
|
|
|
|
|
|
; Definitions
|
|
|
|
|
(argument
|
2023-07-22 15:29:32 +02:00
|
|
|
name: (identifier) @local.definition.parameter
|
2021-12-22 13:26:55 -05:00
|
|
|
(#set! "definition.var.scope" "local")
|
2021-02-02 18:58:07 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
(variable_definition
|
2023-07-22 15:29:32 +02:00
|
|
|
name: (variable (local_var (identifier) @local.definition.var
|
2021-02-02 18:58:07 +01:00
|
|
|
)))
|
|
|
|
|
|
|
|
|
|
(variable_definition
|
2023-07-22 15:29:32 +02:00
|
|
|
name: (variable (environment_var (identifier) @local.definition.var))
|
2021-12-22 13:26:55 -05:00
|
|
|
(#set! "definition.var.scope" "global"))
|
2021-02-02 18:58:07 +01:00
|
|
|
|
2023-07-22 15:29:32 +02:00
|
|
|
(function_definition name: (variable) @local.definition.var
|
2021-12-22 13:26:55 -05:00
|
|
|
(#set! "definition.var.scope" "parent")
|
2021-02-02 18:58:07 +01:00
|
|
|
)
|
|
|
|
|
|
2023-07-22 15:29:32 +02:00
|
|
|
(identifier) @local.reference
|