mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-12 00:10:04 -04:00
ApX is a command-oriented scripting language for the APEX PDE (Personal Development Environment). It features pipelines, 200+ built-in commands, control flow, functions, macros, and more. Grammar repository: https://github.com/StackApe/tree-sitter-apx
39 lines
752 B
Scheme
39 lines
752 B
Scheme
; ApX Tree-sitter locals queries for scope tracking
|
|
|
|
; Scopes
|
|
(function_definition) @local.scope
|
|
(macro_definition) @local.scope
|
|
(closure) @local.scope
|
|
(for_statement) @local.scope
|
|
(block) @local.scope
|
|
|
|
; Definitions
|
|
(assignment
|
|
(identifier) @local.definition)
|
|
|
|
(variable_assignment
|
|
(variable) @local.definition)
|
|
|
|
(parameter
|
|
(identifier) @local.definition)
|
|
|
|
(function_definition
|
|
(identifier) @local.definition)
|
|
|
|
(macro_definition
|
|
(identifier) @local.definition)
|
|
|
|
(alias_definition
|
|
(identifier) @local.definition)
|
|
|
|
(for_statement
|
|
(identifier) @local.definition)
|
|
|
|
(closure_parameters
|
|
(identifier) @local.definition)
|
|
|
|
; References
|
|
(regular_variable) @local.reference
|
|
(command_expression
|
|
(command_name
|
|
(identifier) @local.reference))
|