2022-01-18 22:15:26 +01:00
|
|
|
; Scopes
|
2020-04-18 19:21:01 +02:00
|
|
|
|
2022-01-18 22:15:26 +01:00
|
|
|
[
|
|
|
|
|
(chunk)
|
|
|
|
|
(do_statement)
|
|
|
|
|
(while_statement)
|
|
|
|
|
(repeat_statement)
|
|
|
|
|
(if_statement)
|
|
|
|
|
(for_statement)
|
|
|
|
|
(function_declaration)
|
|
|
|
|
(function_definition)
|
|
|
|
|
] @scope
|
2020-04-18 19:21:01 +02:00
|
|
|
|
2022-01-18 22:15:26 +01:00
|
|
|
; Definitions
|
2020-04-18 19:21:01 +02:00
|
|
|
|
2022-01-18 22:15:26 +01:00
|
|
|
(assignment_statement
|
|
|
|
|
(variable_list
|
|
|
|
|
(identifier) @definition.var))
|
2020-04-18 19:21:01 +02:00
|
|
|
|
2022-01-18 22:15:26 +01:00
|
|
|
(assignment_statement
|
|
|
|
|
(variable_list
|
|
|
|
|
(dot_index_expression . (_) @definition.associated (identifier) @definition.var)))
|
2020-04-23 10:29:41 +02:00
|
|
|
|
2022-10-16 18:02:26 -07:00
|
|
|
((function_declaration
|
2022-01-18 22:15:26 +01:00
|
|
|
name: (identifier) @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
|
2022-01-18 22:15:26 +01:00
|
|
|
name: (dot_index_expression
|
|
|
|
|
. (_) @definition.associated (identifier) @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
|
2022-01-18 22:15:26 +01:00
|
|
|
name: (method_index_expression
|
|
|
|
|
. (_) @definition.associated (identifier) @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
|
|
|
|
|
(identifier) @definition.var))
|
2020-11-26 01:59:43 +00:00
|
|
|
|
2022-01-18 22:15:26 +01:00
|
|
|
(for_numeric_clause
|
|
|
|
|
name: (identifier) @definition.var)
|
|
|
|
|
|
|
|
|
|
(parameters (identifier) @definition.parameter)
|
|
|
|
|
|
|
|
|
|
; References
|
2020-04-18 19:21:01 +02:00
|
|
|
|
2021-01-27 09:32:45 +01:00
|
|
|
[
|
|
|
|
|
(identifier)
|
|
|
|
|
] @reference
|