You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rename to Kex.AST; migrate docgen and Tey's manifest reader #137
The final stage: give the surface its right name and move the consumers onto it.
Rename
src/stdlib/parser.kex becomes src/stdlib/ast.kex, declaring module Kex.AST — beside Kex.Interface in src/stdlib/kex.kex, which is where compiler introspection already lives.
The top-level name Parser goes away. It reads as a peer of Parsing, the stdlib's parser-combinator module, with which it has nothing whatever to do; that collision has been a standing source of confusion and this frees the good name for the combinators.
Surface: parse, parseFile, parseType, parseExpression, toSource, and the TypeRef / PatternRef printers. src/stdlib/prelude.kex updated accordingly.
Consumers
tools/docgen/docgen.kex — mechanical rename; it is the existing consumer and its output must not move.
Tey.Manifest — the substantive one. Replace the reader that recognises declarations by their leading word with a match over Kex.AST nodes: bundle "x" do ... end is a Call with a block, tey("greet", git: ..., tag: ...) is a Call with named arguments. Both became expressible in Full-fidelity AST schema: named args, call blocks, patterns, bodies #135.
This removes the drift risk docs/tey-limitations.md describes — a hand-written grammar can accept or reject something the compiler does not, so a manifest Kex parses is one Tey rejects. Reading the compiler's own AST cannot drift by construction.
docs/tey-limitations.md — drop the manifest-reader entry, including the "middle option" paragraph about building the reader on the Parsing combinators instead, which this supersedes.
Verification
make test-all, both backends.
Docgen output diffed before/after the rename — must be identical.
Tey reading a real package.kex that uses a bundle block and named-argument tey(...) lines, on BEAM.
changed the title [-]Rename to `Kex.Ast`; migrate docgen and Tey's manifest reader[/-][+]Rename to `Kex.AST`; migrate docgen and Tey's manifest reader[/+]on Aug 19, 2026
Done. The surface is Kex.AST (src/stdlib/kex/ast.kex; src/stdlib/parser.kex is gone, and src/interpreter/stdlib/parser.cxx now defines the Kex.AST module), and both consumers are migrated: tools/docgen/docgen.kex parses through Kex.AST.parseFile, and tey/src/tey/manifest.kex opens with using Kex.AST instead of scanning declarations by leading word.
Activity
[-]Rename to `Kex.Ast`; migrate docgen and Tey's manifest reader[/-][+]Rename to `Kex.AST`; migrate docgen and Tey's manifest reader[/+]akoskovacs commentedon Aug 21, 2026
Done. The surface is
Kex.AST(src/stdlib/kex/ast.kex;src/stdlib/parser.kexis gone, andsrc/interpreter/stdlib/parser.cxxnow defines theKex.ASTmodule), and both consumers are migrated:tools/docgen/docgen.kexparses throughKex.AST.parseFile, andtey/src/tey/manifest.kexopens withusing Kex.ASTinstead of scanning declarations by leading word.