Languages / Starlark · Edit queries/tags.scm
Tier 2 · Declarative tags.scmStarlark
Declarative tree-sitter query plugin powered by QueryLanguagePlugin (rgctl-lang-runtime) and crates/rgctl-lang-starlark/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-starlark
- Plugin
- QueryLanguagePlugin (rgctl-lang-starlark)
- Extensions
- .star, .bzl
- Discover
- rgctl discover . -l starlark
- Function Kinds
- function_definition
- Class / Container Kinds
- —
Capture summary
| Capture | Patterns | Graph mapping |
|---|---|---|
| @_load | 2 | Lexical scope capture. |
| @definition.function | 1 | Emits SymbolType::Function (acts as caller scope & container). |
| @import.path | 1 | Emits SymbolType::Import with normalized import_path metadata. |
| @name | 2 | Symbol identifier or target callee/type name. |
| @reference.call | 1 | Emits RelationType::Calls from innermost enclosing function to @name. |
Query source (crates/rgctl-lang-starlark/queries/tags.scm)
; Tier-2 Starlark tags for rgctl.
(function_definition
name: (identifier) @name) @definition.function
(call
function: (identifier) @name) @reference.call
(call
function: (identifier) @_load (#eq? @_load "load")
arguments: (argument_list
. (string) @import.path))
Related: Tier 2 language support · Tier 1 language support · Discovering and indexing