Skip to main content

Crate dmc_codegen

Crate dmc_codegen 

Source
Expand description

User-facing walkthrough: ../../dmc-docs/dmc-codegen/ Run cargo doc --open -p dmc-codegen for the inline rustdoc. Codegen layer: turn a parsed Document into renderable output.

Two emitters live here:

Both implement NodeSink. A single Walker does one pre-order DFS, fanning each node to every active sink - no N tree traversals.

Re-exports§

pub use html::HtmlEmitter;
pub use html::RenderOptions;
pub use html::render_html;
pub use html::render_html_with;
pub use mdx::MdxBodyEmitter;
pub use mdx::render_mdx_body;

Modules§

html
mdx

Structs§

WalkCtx
Position info handed to every sink callback. Read-only.
Walker
Pre-order DFS over doc.children. At every node, every sink’s enter fires (in slice order); the walker then recurses into the node’s children; finally every sink’s leave fires (in reverse slice order, LIFO).

Traits§

NodeSink
Callback pair invoked by Walker at every node.