2021-02-02 18:58:07 +01:00
|
|
|
; Scopes
|
|
|
|
|
[
|
2024-01-06 15:05:50 +09:00
|
|
|
(function_call)
|
|
|
|
|
(code_block)
|
|
|
|
|
(function_block)
|
2023-07-22 15:29:32 +02:00
|
|
|
] @local.scope
|
2021-02-02 18:58:07 +01:00
|
|
|
|
|
|
|
|
; Definitions
|
2024-01-06 15:05:50 +09:00
|
|
|
(argument
|
|
|
|
|
name: (identifier) @local.definition.parameter
|
2024-07-27 16:28:19 -07:00
|
|
|
(#set! definition.var.scope "local"))
|
2021-02-02 18:58:07 +01:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(variable_definition
|
2024-03-21 20:44:35 +09:00
|
|
|
name: (variable
|
|
|
|
|
(local_var
|
|
|
|
|
(identifier) @local.definition.var)))
|
2021-02-02 18:58:07 +01:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(variable_definition
|
2024-03-21 20:44:35 +09:00
|
|
|
name: (variable
|
|
|
|
|
(environment_var
|
|
|
|
|
(identifier) @local.definition.var))
|
2024-07-27 16:28:19 -07:00
|
|
|
(#set! definition.var.scope "global"))
|
2021-02-02 18:58:07 +01:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(function_definition
|
|
|
|
|
name: (variable) @local.definition.var
|
2024-07-27 16:28:19 -07: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
|