Documentation
¶
Overview ¶
Package dump renders an ast.Node as a stable, human-reviewable tree.
It serves two purposes described in PLAN.md, both standing in for the upstream parse-tree goldens SQLite cannot produce:
- Committed AST snapshots for a curated slice of the corpus, reviewed by humans in diffs but never authoritative over the accept/reject oracle.
- The comparison key for the round-trip property, where a tree is rendered back to SQL, re-parsed, and the two trees must match.
The renderer is reflective rather than a type switch, so it never falls behind the node set: a field added to a node shows up in the dump, and in any snapshot diff, without anyone having to remember.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Snapshot = Options{Positions: true, Raw: true}
Snapshot is the option set for committed snapshots: everything.
var Structure = Options{}
Structure is the option set for comparing two trees for equality of shape. It drops spans and Raw text, which are exactly the things meyer's renderer declines to promise: re-parsing rendered SQL moves every offset and may respell any token.