pub enum InlineElem {
Char(CharTok),
CodeText(CodeTextTok),
Space(SpaceTok),
Break(BreakTok),
Embed {
var: VarInHorzTok,
semi: EndActiveTok,
},
EmbedMath {
mgrp: MathGroup<()>,
elems: Vec<MathErased>,
},
Cmd {
name: AnyHorzCmdTok,
tail: CmdTail,
},
ItemBullet(ItemTok),
Sep(SepTok),
}Expand description
One inline-text element (ih/ihtext/ihcmd in parser.mly).
ItemBullet/Sep are flat markers rather than the nested tree
parser.mly builds in-grammar (sxsep’s nonempty_list(sxitem) /
sxlist): since InlineText’s content is already a flat
Vec<InlineElem>, regrouping consecutive ItemBullet-headed runs
into an itemize tree (and Sep-delimited runs into columns, for
tabular/math use later) is deferred to the elaborator. Token-level
round-tripping is unaffected either way.
Variants§
Char(CharTok)
CodeText(CodeTextTok)
A backtick literal written inside inline text (`…`). Its own
arm, not a Char run, so the elaborator can dispatch it through the
context’s code-text command — see Token::CodeText.
Space(SpaceTok)
Break(BreakTok)
Embed
#var; — embeds a program variable’s value as inline content.
EmbedMath
${ math } — embeds math content as inline text (ihcmd’s
BMATHGRP mathblock EMATHGRP case).
Cmd
\cmd … (name also accepts the module-qualified
\Mod.cmd form).
ItemBullet(ItemTok)
An itemize bullet (*+) marker — see the variant-group doc above.
Sep(SepTok)
A | separator marker — see the variant-group doc above.
Trait Implementations§
Source§impl Clone for InlineElem
impl Clone for InlineElem
Source§fn clone(&self) -> InlineElem
fn clone(&self) -> InlineElem
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 InlineElem
impl Debug for InlineElem
Source§impl<__SyanMacro_Atom> Parse<__SyanMacro_Atom> for InlineElemwhere
__SyanMacro_Atom: Spanned + Clone,
CharTok: Parse<__SyanMacro_Atom>,
CodeTextTok: Parse<__SyanMacro_Atom>,
SpaceTok: Parse<__SyanMacro_Atom>,
BreakTok: Parse<__SyanMacro_Atom>,
VarInHorzTok: Parse<__SyanMacro_Atom>,
EndActiveTok: Parse<__SyanMacro_Atom>,
MathGroup<()>: GroupShape<__SyanMacro_Atom>,
__SyanSubstructOfOwn_mgrp_InlineElem_EmbedMath_672281474488818023: Parse<__SyanMacro_Atom>,
AnyHorzCmdTok: Parse<__SyanMacro_Atom>,
CmdTail: Parse<__SyanMacro_Atom>,
ItemTok: Parse<__SyanMacro_Atom>,
SepTok: Parse<__SyanMacro_Atom>,
impl<__SyanMacro_Atom> Parse<__SyanMacro_Atom> for InlineElemwhere
__SyanMacro_Atom: Spanned + Clone,
CharTok: Parse<__SyanMacro_Atom>,
CodeTextTok: Parse<__SyanMacro_Atom>,
SpaceTok: Parse<__SyanMacro_Atom>,
BreakTok: Parse<__SyanMacro_Atom>,
VarInHorzTok: Parse<__SyanMacro_Atom>,
EndActiveTok: Parse<__SyanMacro_Atom>,
MathGroup<()>: GroupShape<__SyanMacro_Atom>,
__SyanSubstructOfOwn_mgrp_InlineElem_EmbedMath_672281474488818023: Parse<__SyanMacro_Atom>,
AnyHorzCmdTok: Parse<__SyanMacro_Atom>,
CmdTail: Parse<__SyanMacro_Atom>,
ItemTok: Parse<__SyanMacro_Atom>,
SepTok: Parse<__SyanMacro_Atom>,
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.