Languages / GLSL · Edit queries/tags.scm
Tier 2 · Declarative tags.scmGLSL
Declarative tree-sitter query plugin powered by QueryLanguagePlugin (rgctl-lang-runtime) and crates/rgctl-lang-glsl/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-glsl
- Plugin
- QueryLanguagePlugin (rgctl-lang-glsl)
- Extensions
- .glsl, .vert, .frag, .comp
- Discover
- rgctl discover . -l glsl
- Function Kinds
- function_definition
- Class / Container Kinds
- struct_specifier
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). |
| @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-glsl/queries/tags.scm)
; Tier-2 GLSL tags for rgctl.
(function_definition
declarator: (function_declarator
declarator: (identifier) @name)) @definition.function
(struct_specifier
name: (type_identifier) @name) @definition.class
(call_expression
function: (identifier) @name) @reference.call
Related: Tier 2 language support · Tier 1 language support · Discovering and indexing