Languages / Racket · Edit queries/tags.scm
Tier 2 · Declarative tags.scmRacket
Declarative tree-sitter query plugin powered by QueryLanguagePlugin (rgctl-lang-runtime) and crates/rgctl-lang-racket/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-racket
- Plugin
- QueryLanguagePlugin (rgctl-lang-racket)
- Extensions
- .rkt
- Discover
- rgctl discover . -l racket
- Function Kinds
- list
- Class / Container Kinds
- —
Capture summary
| Capture | Patterns | Graph mapping |
|---|---|---|
| @_kw | 8 | Lexical scope capture. |
| @definition.class | 1 | Emits SymbolType::Class (acts as enclosing container). |
| @definition.function | 2 | Emits SymbolType::Function (acts as caller scope & 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-racket/queries/tags.scm)
; Tier-2 Racket tags for rgctl.
(list
. (symbol) @_kw (#any-of? @_kw "define" "define-syntax")
. (symbol) @name) @definition.function
(list
. (symbol) @_kw (#eq? @_kw "define")
. (list . (symbol) @name)) @definition.function
(list
. (symbol) @_kw (#eq? @_kw "struct")
. (symbol) @name) @definition.class
(list
. (symbol) @_kw (#eq? @_kw "require")
. (_) @import.path)
(list
. (symbol) @name
(#not-any-of? @name "define" "define-syntax" "lambda" "let" "let*" "letrec" "if" "cond" "begin" "quote" "set!" "struct" "require" "provide" "module")) @reference.call
Related: Tier 2 language support · Tier 1 language support · Discovering and indexing