Expand description
The structural engine: parse + tag extraction + syntax check, over grammars loaded from the registry as wasm.
Tags are extracted by running the grammar’s tags.scm through the Query
engine (interpreting @definition.* / @reference.* / @name captures),
because tree-sitter-tags cannot drive a wasm-loaded language. The same path
serves every language, static or wasm.
Structs§
- Defect
- A syntactic defect found by
check. - Import
Binding - One name brought into a file by an import statement (ADR 0001 Step 2).
- Symbol
- A definition or reference extracted from a file.
Functions§
- check
- Parse a file and report every ERROR / MISSING node.
- enclosing_
function_ at - Name of the function/method enclosing
byte, qualified by container. - extract
- Extract all tags (definitions + references) from one file’s source.
- extract_
imports - Extract every import binding from a file, via the grammar’s
imports.scm(@import.name/ optional@import.source/@import.module). Returns an empty vec when the grammar ships no imports query. Pure single-file parse. - extract_
with_ tree - Like
extract, but also returns the parsed tree so a caller that needs a second pass (e.g.callers’ enclosing-function lookup) can reuse it instead of re-parsing the identical bytes. Parsing dominates tree-sitter cost. - identifier_
at - The identifier text at a (row, col) position — for go-to-def.
- resolve_
local_ at - Scope-aware go-to-def: resolve the identifier at
(row, col)to its nearest enclosing local binding, using the grammar’slocals.scm. - slice
- The full source of a symbol, given its byte range.
- with_
tree - Run a closure with the parsed tree of
sourceundergrammar. The closure receives the root node and the grammar’s profile.