Languages / Pascal / Delphi · Edit queries/tags.scm
Tier 2 · Declarative tags.scmPascal / Delphi
Declarative tree-sitter query plugin powered by QueryLanguagePlugin (rgctl-lang-runtime) and crates/rgctl-lang-pascal/queries/tags.scm. Compiles once at startup, validates captures against the Tier-2 vocabulary gate, and extracts symbols, container hierarchy (Container::member), imports, and call edges.
- Grammar Crate
- tree-sitter-pascal
- Plugin
- QueryLanguagePlugin (rgctl-lang-pascal)
- Extensions
- .pas, .dpr, .dpk, .lpr
- Discover
- rgctl discover . -l pascal
- Function Kinds
- defProc, declProc
- Class / Container Kinds
- declClass, declIntf, declType
Capture summary
| Capture | Patterns | Graph mapping |
|---|---|---|
| @_cls | 1 | Lexical scope capture. |
| @definition.class | 1 | Emits SymbolType::Class (acts as enclosing container). |
| @definition.function | 1 | Emits SymbolType::Function (acts as caller scope & container). |
| @definition.interface | 1 | Emits SymbolType::Interface (acts as enclosing container). |
| @definition.method | 1 | Emits SymbolType::Method (acts as caller scope & container). |
| @definition.module | 3 | Emits SymbolType::Module (acts as enclosing container). |
| @definition.type | 1 | Emits SymbolType::Type (acts as enclosing container). |
| @import.path | 1 | Emits SymbolType::Import with normalized import_path metadata. |
| @name | 9 | Symbol identifier or target callee/type name. |
| @reference.call | 1 | Emits RelationType::Calls from innermost enclosing function to @name. |
Query source (crates/rgctl-lang-pascal/queries/tags.scm)
; Tier-2 Pascal/Delphi tags for rgctl (`handler = "queries"`).
(unit
(moduleName
(identifier) @name)) @definition.module
(program
(moduleName
(identifier) @name)) @definition.module
(library
(moduleName
(identifier) @name)) @definition.module
(declType
(identifier) @name
(declClass)) @definition.class
(declType
(identifier) @name
(declIntf)) @definition.interface
(declType
(identifier) @name
[(declEnum) (declSet) (declArray) (declString) (declFile) (declProcRef)]) @definition.type
(declProc
(identifier) @name) @definition.function
(defProc
header: (declProc
(genericDot
(identifier) @_cls
(identifier) @name))) @definition.method
(declUses
(moduleName
(identifier) @import.path))
(exprCall
entity: (identifier) @name) @reference.callRelated: Tier 2 language support · Tier 1 language support · Discovering and indexing