Skip to main content

build_ir

Function build_ir 

Source
pub(crate) fn build_ir<'a>(
    root: &'a AstNode<'a>,
    lex_out: Option<&BorrowedLexOutput<'a>>,
) -> IrDocument
Expand description

Walk a comrak AST root and project it to IrDocument.

lex_out carries the borrowed-AST registry. When Some, every PUA sentinel in the comrak text is projected to its matching IrBlock / IrInline variant; when None, the walker degrades to markdown-only behaviour (used by Options::aozora_enabled = false).