2022-01-18 22:15:26 +01:00
|
|
|
; Scopes
|
|
|
|
|
[
|
|
|
|
|
(chunk)
|
|
|
|
|
(do_statement)
|
|
|
|
|
(while_statement)
|
|
|
|
|
(repeat_statement)
|
|
|
|
|
(if_statement)
|
|
|
|
|
(for_statement)
|
|
|
|
|
(function_declaration)
|
|
|
|
|
(function_definition)
|
2023-07-22 15:29:32 +02:00
|
|
|
] @local.scope
|
2020-04-18 19:21:01 +02:00
|
|
|
|
2022-01-18 22:15:26 +01:00
|
|
|
; Definitions
|
|
|
|
|
(assignment_statement
|
|
|
|
|
(variable_list
|
2023-07-22 15:29:32 +02:00
|
|
|
(identifier) @local.definition.var))
|
2020-04-18 19:21:01 +02:00
|
|
|
|
2022-01-18 22:15:26 +01:00
|
|
|
(assignment_statement
|
|
|
|
|
(variable_list
|
2024-01-06 15:05:50 +09:00
|
|
|
(dot_index_expression
|
|
|
|
|
.
|
|
|
|
|
(_) @local.definition.associated
|
|
|
|
|
(identifier) @local.definition.var)))
|
2020-04-23 10:29:41 +02:00
|
|
|
|
2022-10-16 18:02:26 -07:00
|
|
|
((function_declaration
|
2023-07-22 15:29:32 +02:00
|
|
|
name: (identifier) @local.definition.function)
|
2022-10-16 18:02:26 -07:00
|
|
|
(#set! definition.function.scope "parent"))
|
2020-04-18 19:21:01 +02:00
|
|
|
|
2022-10-16 18:02:26 -07:00
|
|
|
((function_declaration
|
2024-03-21 20:44:35 +09:00
|
|
|
name: (dot_index_expression
|
|
|
|
|
.
|
|
|
|
|
(_) @local.definition.associated
|
|
|
|
|
(identifier) @local.definition.function))
|
2022-10-16 18:02:26 -07:00
|
|
|
(#set! definition.method.scope "parent"))
|
2021-02-06 22:29:14 -05:00
|
|
|
|
2022-10-16 18:02:26 -07:00
|
|
|
((function_declaration
|
2024-03-21 20:44:35 +09:00
|
|
|
name: (method_index_expression
|
|
|
|
|
.
|
|
|
|
|
(_) @local.definition.associated
|
|
|
|
|
(identifier) @local.definition.method))
|
2022-10-16 18:02:26 -07:00
|
|
|
(#set! definition.method.scope "parent"))
|
2020-04-18 19:21:01 +02:00
|
|
|
|
2022-01-18 22:15:26 +01:00
|
|
|
(for_generic_clause
|
|
|
|
|
(variable_list
|
2023-07-22 15:29:32 +02:00
|
|
|
(identifier) @local.definition.var))
|
2020-11-26 01:59:43 +00:00
|
|
|
|
2022-01-18 22:15:26 +01:00
|
|
|
(for_numeric_clause
|
2023-07-22 15:29:32 +02:00
|
|
|
name: (identifier) @local.definition.var)
|
2022-01-18 22:15:26 +01:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(parameters
|
|
|
|
|
(identifier) @local.definition.parameter)
|
2022-01-18 22:15:26 +01:00
|
|
|
|
|
|
|
|
; References
|
2024-01-06 15:05:50 +09:00
|
|
|
(identifier) @local.reference
|