2023-07-22 15:29:32 +02:00
|
|
|
(block) @local.scope
|
2024-01-20 18:47:56 +09:00
|
|
|
|
2022-11-06 17:44:50 +01:00
|
|
|
; Parameter definitions
|
|
|
|
|
(parameter_declaration
|
|
|
|
|
command: (identifier)
|
2023-07-22 15:29:32 +02:00
|
|
|
macro: (macro) @local.definition.parameter)
|
2022-11-06 17:44:50 +01:00
|
|
|
|
|
|
|
|
; Variable definitions
|
|
|
|
|
(macro_definition
|
|
|
|
|
command: (identifier)
|
2023-07-22 15:29:32 +02:00
|
|
|
macro: (macro) @local.definition.var)
|
2022-11-06 17:44:50 +01:00
|
|
|
|
|
|
|
|
(command_expression
|
|
|
|
|
command: (identifier)
|
2024-03-21 20:44:35 +09:00
|
|
|
arguments: (argument_list
|
2025-11-12 10:06:04 +01:00
|
|
|
declarator: (symbol) @local.definition.var))
|
2022-11-06 17:44:50 +01:00
|
|
|
|
|
|
|
|
; Function definitions
|
|
|
|
|
(subroutine_block
|
|
|
|
|
command: (identifier)
|
2023-07-22 15:29:32 +02:00
|
|
|
subroutine: (identifier) @local.definition.function)
|
2022-11-06 17:44:50 +01:00
|
|
|
|
|
|
|
|
(labeled_expression
|
2023-07-22 15:29:32 +02:00
|
|
|
label: (identifier) @local.definition.function
|
2022-11-06 17:44:50 +01:00
|
|
|
(block))
|
|
|
|
|
|
|
|
|
|
; References
|
2024-01-06 15:05:50 +09:00
|
|
|
((subroutine_call_expression
|
|
|
|
|
command: (identifier)
|
|
|
|
|
subroutine: (identifier) @local.reference)
|
|
|
|
|
(#set! reference.kind "function"))
|
2022-11-06 17:44:50 +01:00
|
|
|
|
2023-07-25 06:12:57 +02:00
|
|
|
[
|
|
|
|
|
(macro)
|
2025-11-12 10:06:04 +01:00
|
|
|
(symbol)
|
2023-07-22 15:29:32 +02:00
|
|
|
] @local.reference
|