nvim-treesitter/runtime/queries/t32/locals.scm

37 lines
761 B
Scheme
Raw Normal View History

(block) @local.scope
2022-11-06 17:44:50 +01:00
; Parameter definitions
(parameter_declaration
command: (identifier)
macro: (macro) @local.definition.parameter)
2022-11-06 17:44:50 +01:00
; Variable definitions
(macro_definition
command: (identifier)
macro: (macro) @local.definition.var)
2022-11-06 17:44:50 +01:00
(command_expression
command: (identifier)
arguments: (argument_list
declarator: (symbol) @local.definition.var))
2022-11-06 17:44:50 +01:00
; Function definitions
(subroutine_block
command: (identifier)
subroutine: (identifier) @local.definition.function)
2022-11-06 17:44:50 +01:00
(labeled_expression
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
[
(macro)
(symbol)
] @local.reference