midad ast
midad ast <file.md>
Prints the parsed program: the frontmatter, the state declarations, the functions, the routes and the rest, as the compiler sees them. It is a debugging tool for working on midad itself, not a stable format; the output is the Rust debug representation of the syntax tree.
Two things to know before you pipe it somewhere:
- The output is large, and it is not an API. It changes when the parser does.
midad ast x.md | headkills the process with a broken-pipe panic instead of stopping cleanly. Redirect it to a file instead.
For anything a tool needs, use midad spec or
midad explain instead.