pub struct MathElemCst {
pub base: MathBot,
pub scripts: Vec<MathScript>,
}Expand description
mathtop: one math element, i.e. a mathbot base with any postfix
^/_/' script combos (mathtop’s seven alternatives, flattened
to a Vec in source order — the same Ops/OpChain deferred-
precedence technique, since combos 3–6 interleave sub/superscript
application order in a way elaboration is better placed to resolve).
No direct self-loop. Unlike Expr/PatBot/TypeExpr, this
grammar corner needs no fourth singleton SCC at all: scripts is a
Vec, so an empty run already degenerates to plain mathbot, and
mathbot’s only recursive spot ({ … } re-entering mathmain) is
threaded through MathErased exactly like every other nested
reference to “one math element” (matharg’s math-mode argument,
Atomic::MathText’s program-mode embed, InlineElem::EmbedMath’s
inline-text embed, MathGroupArg’s { … } script operand). So
MathElemCst is structurally acyclic within #[recurse]’s SCC
analysis — like OpChain/AppExpr/Atomic — and monomorphizes
exactly once (one stream type). This is safer than carving out a
real self-loop would have been, not a shortcut: every recursive edge
is erased, so there is no bounded-depth engine to blow up.
Fields§
§base: MathBot§scripts: Vec<MathScript>Trait Implementations§
Source§impl Clone for MathElemCst
impl Clone for MathElemCst
Source§fn clone(&self) -> MathElemCst
fn clone(&self) -> MathElemCst
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MathElemCst
impl Debug for MathElemCst
Source§impl<__SyanMacro_Atom> Parse<__SyanMacro_Atom> for MathElemCst
impl<__SyanMacro_Atom> Parse<__SyanMacro_Atom> for MathElemCst
Source§type Error = ParseError<<__SyanMacro_Atom as Spanned>::Span>
type Error = ParseError<<__SyanMacro_Atom as Spanned>::Span>
<FieldTy as Parse<Atom>>::Error: Into<…> predicate re-creates a projection cycle on a
recursive field (E0275), which decycle’s bound-peeling does not break.