Languages / R · Edit queries/tags.scm
Tier 2 · Declarative tags.scmR
Declarative tree-sitter query plugin powered by QueryLanguagePlugin (rgctl-lang-runtime) and crates/rgctl-lang-r/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-r
- Plugin
- QueryLanguagePlugin (rgctl-lang-r)
- Extensions
- .r, .R
- Discover
- rgctl discover . -l r
- Function Kinds
- function_definition
- Class / Container Kinds
- —
Capture summary
| Capture | Patterns | Graph mapping |
|---|---|---|
| @definition.function | 2 | Emits SymbolType::Function (acts as caller scope & container). |
| @name | 3 | Symbol identifier or target callee/type name. |
| @reference.call | 1 | Emits RelationType::Calls from innermost enclosing function to @name. |
Query source (crates/rgctl-lang-r/queries/tags.scm)
; Tier-2 R tags for rgctl (`handler = "queries"`).
(binary_operator
lhs: (identifier) @name
operator: "<-"
rhs: (function_definition)
) @definition.function
(binary_operator
lhs: (identifier) @name
operator: "="
rhs: (function_definition)
) @definition.function
(call
function: (identifier) @name
) @reference.call
Related: Tier 2 language support · Tier 1 language support · Discovering and indexing