Languages / Ada · Edit queries/tags.scm
Tier 2 · Declarative tags.scmAda
Declarative tree-sitter query plugin powered by QueryLanguagePlugin (rgctl-lang-runtime) and crates/rgctl-lang-ada/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-ada
- Plugin
- QueryLanguagePlugin (rgctl-lang-ada)
- Extensions
- .adb, .ads, .ada
- Discover
- rgctl discover . -l ada
- Function Kinds
- subprogram_declaration, subprogram_body
- Class / Container Kinds
- full_type_declaration, task_type_declaration, protected_type_declaration
Capture summary
| Capture | Patterns | Graph mapping |
|---|---|---|
| @definition.class | 2 | Emits SymbolType::Class (acts as enclosing container). |
| @definition.function | 4 | Emits SymbolType::Function (acts as caller scope & container). |
| @definition.module | 2 | Emits SymbolType::Module (acts as enclosing container). |
| @definition.type | 2 | Emits SymbolType::Type (acts as enclosing container). |
| @import.path | 1 | Emits SymbolType::Import with normalized import_path metadata. |
| @name | 12 | Symbol identifier or target callee/type name. |
| @reference.call | 2 | Emits RelationType::Calls from innermost enclosing function to @name. |
Query source (crates/rgctl-lang-ada/queries/tags.scm)
; Tier-2 Ada tags for rgctl (`handler = "queries"`).
(package_declaration
name: (identifier) @name) @definition.module
(package_body
name: (identifier) @name) @definition.module
(subprogram_body
(function_specification
name: (identifier) @name)) @definition.function
(subprogram_body
(procedure_specification
name: (identifier) @name)) @definition.function
(subprogram_declaration
(function_specification
name: (identifier) @name)) @definition.function
(subprogram_declaration
(procedure_specification
name: (identifier) @name)) @definition.function
(full_type_declaration
(identifier) @name) @definition.type
(private_type_declaration
(identifier) @name) @definition.type
(task_type_declaration
(identifier) @name) @definition.class
(protected_type_declaration
(identifier) @name) @definition.class
(with_clause
[(identifier) (selected_component)] @import.path)
(function_call
(identifier) @name) @reference.call
(procedure_call_statement
name: (identifier) @name) @reference.callRelated: Tier 2 language support · Tier 1 language support · Discovering and indexing