feat: add dsl::toAscii, a console listing of a parsed graph - #19
Merged
Merged
Conversation
psyinf
force-pushed
the
feature/to-dot
branch
from
September 19, 2026 20:53
12d14c6 to
b7a1658
Compare
One tree per graph input: each line is a stage followed by the edge it produces (or end), fan-out shows as siblings, and a merge appears as a reference in its inputs' trees plus a tree of its own under its group. AsciiStyle::plain (default) or AsciiStyle::unicode box drawing. Every stage of an invalid program (a cycle, a missing producer) is still printed once. TODO.md: the item shrinks to the 2D box layout that remains.
psyinf
force-pushed
the
feature/to-ascii
branch
from
September 19, 2026 20:59
4457246 to
4f00c6d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the first step of TODO item "
dsl::toAscii: console rendering". Stacked on #18 (which is stacked on #17). Merge those first; this PR then retargets tomain.What
dsl::toAscii(program, style = AsciiStyle::plain)prints a parsed graph as an indented listing and needs no external tool:in,in.<key>). Each line is a stage in DSL syntax (Print(prefix="[tap] ")) followed by the edge it produces, orend.(name: proper, greeting: shouted)).AsciiStyle::unicodedraws with├─► └─► │ ─►(UTF-8, written as byte escapes because the build has no/utf-8). A Windows console needschcp 65001to show them, which is why plain is the default.(see above).Not in this PR
The 2D box layout (layered columns, crossing reduction, edge routing) stays in TODO.md as item 7, now scoped to just that, to be done only if the listing turns out not to be enough.
Docs / tests
README ("Visualizing" + feature list), EXAMPLE.md section 6 (listing of the section 3 graph), CHANGELOG. Four new cases compare the full output text: merge/fan-out, arguments/dead ends/both styles, invalid program, named group. All 114 tests pass (MSVC debug, ASan).