Expand description
The parser entry point and its output type.
parse runs the pipeline: lex → [grammar::parse] (the recursive
descent, which emits events + errors) → [build_tree] (the green tree).
Syntax errors ride a side channel and never abort the parse.
Re-exports§
pub use crate::SyntaxError;
Structs§
- Parse
- A green tree and the syntax errors gathered while parsing it.
Functions§
- parse
- Parse LaTeX source into a lossless CST.
- parse_
with_ declarations - Parse LaTeX source under an explicit
LexConfigand a project’s declarations — the one input to the tree that is not the text (AGENTS.mddecision #12). - parse_
with_ declarations_ resolved parse_with_declarations, additionally handing back theParseCtxthe returned tree was parsed under.- parse_
with_ flavor - Parse LaTeX source into a lossless CST under an explicit
LexConfig. - reconstruct
- Parse
inputand render the CST back to source. By the losslessness invariant this always equalsinput.