Languages / Erlang · Edit queries/tags.scm
Tier 2 · Declarative tags.scmErlang
Declarative tree-sitter query plugin powered by QueryLanguagePlugin (rgctl-lang-runtime) and crates/rgctl-lang-erlang/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-erlang
- Plugin
- QueryLanguagePlugin (rgctl-lang-erlang)
- Extensions
- .erl, .hrl
- Discover
- rgctl discover . -l erlang
- Function Kinds
- fun_decl, function_clause
- Class / Container Kinds
- record_decl
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). |
| @name | 6 | Symbol identifier or target callee/type name. |
| @reference.call | 2 | Emits RelationType::Calls from innermost enclosing function to @name. |
Query source (crates/rgctl-lang-erlang/queries/tags.scm)
; Tier-2 Erlang tags for rgctl.
(fun_decl
clause: (function_clause
name: (atom) @name)) @definition.function
(module_attribute
(atom) @name) @definition.module
(record_decl
name: (atom) @name) @definition.class
(type_alias
name: (type_name
name: (atom) @name)) @definition.type
(call
expr: (atom) @name) @reference.call
(call
expr: (remote
fun: (atom) @name)) @reference.call
Related: Tier 2 language support · Tier 1 language support · Discovering and indexing