Languages / Elm · Edit queries/tags.scm
Tier 2 · Declarative tags.scmElm
Declarative tree-sitter query plugin powered by QueryLanguagePlugin (rgctl-lang-runtime) and crates/rgctl-lang-elm/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-elm
- Plugin
- QueryLanguagePlugin (rgctl-lang-elm)
- Extensions
- .elm
- Discover
- rgctl discover . -l elm
- Function Kinds
- value_declaration
- Class / Container Kinds
- type_declaration
Capture summary
| Capture | Patterns | Graph mapping |
|---|---|---|
| @definition.class | 1 | Emits SymbolType::Class (acts as enclosing container). |
| @definition.function | 1 | Emits SymbolType::Function (acts as caller scope & container). |
| @definition.module | 1 | 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 | 5 | Symbol identifier or target callee/type name. |
| @reference.call | 1 | Emits RelationType::Calls from innermost enclosing function to @name. |
Query source (crates/rgctl-lang-elm/queries/tags.scm)
; Tier-2 Elm tags for rgctl.
(module_declaration
(upper_case_qid) @name) @definition.module
(value_declaration
(function_declaration_left
(lower_case_identifier) @name)) @definition.function
(type_declaration
(upper_case_identifier) @name) @definition.class
(type_alias_declaration
(upper_case_identifier) @name) @definition.type
(import_clause
(upper_case_qid) @import.path)
(function_call_expr
(value_expr
(value_qid
(lower_case_identifier) @name))) @reference.call
Related: Tier 2 language support · Tier 1 language support · Discovering and indexing