Expand description
Math AST node wrappers.
Structs§
- Display
Math - Math
Content - The
MATH_CONTENTsubtree root: the parsed TeX content between (but excluding) the math delimiters. Spliced into the host document tree, so its tokens carry host-aligned ranges. - Math
Delimited - A
\left<d> ... \right<d>paired-delimiter run. - Math
Diagnostic - A structural problem found in a realized
MATH_CONTENTsubtree. Therangeis host-aligned (the subtree is spliced into the host document tree), so a consumer turns it straight into a diagnostic span with no remapping. - Math
Environment - A
\begin{env} ... \end{env}environment. - Math
Group - A
{ ... }brace group.
Enums§
- Math
Diagnostic Kind - The kind of a
MathDiagnostic. A neutral structural identity; downstream consumers (the linter, LSP) map it to their own code and message. The parser crate deliberately does not own linter code strings.
Functions§
- math_
content_ text - Reconstruct the raw math content of a math node from its
MATH_CONTENTsubtree, keeping only the math tokens. - math_
diagnostics - Walk a realized
MATH_CONTENTsubtree and report structural problems from its shape. This is the single source of truth for math diagnostics, shared by themath-syntaxlinter rule, the formatter (malformed math is left verbatim rather than reflowed), and the LSP. Ranges are host-aligned.