/* Copyright (c) 2021-2026 Richard Rodger, MIT License */
//! Engine-free entry point for the CommonMark parser. Port of
//! `ts/src/commonmark.ts` and `go/commonmark.go`.
//!
//! Nothing reachable from here imports the tabnas engine. That keeps the
//! parser testable (and the conformance suite runnable) without the engine
//! present, exactly as in the other two runtimes. The plugin wiring lives
//! in `lib.rs`, `engine_block.rs` and `engine_inline.rs`, which import
//! this; never the other way round.
use crateparse_blocks;
use crate;
use crateTree;
use crateOptions;
/// The full two-phase parse (spec Appendix A): block structure first, then
/// inlines over the accumulated string content of each leaf, using the
/// link reference map the block phase collected.
/// [`parse`] with the inline phase reading every bracketed label a
/// definition could name as a reference, left unresolved, and the link
/// reference map not consulted: the tree the AST is projected from (see
/// `ast.rs`). [`parse`] resolves references as CommonMark says, which is
/// the tree the HTML renderer needs.