pub enum StagePrefix {
Next(ExactAmpTok),
Prev(ExactTildeTok),
}Expand description
A staging prefix on a 0.1 operand: &e builds code for the next
stage, ~e splices the result of a previous-stage computation
(expr_un, parser_v1.mly:870-873, UTNext/UTPrev — the same two
productions 0.0.6 has, unchanged).
A fork of crate::cst::ast::StagePrefix, not a re-export: it lives
inside 0.0.6’s #[recurse] module, and this module’s whole discipline
is that touching cst_v1.rs never touches cst.rs (module doc
comment). The two are token-identical, so rustyfi-lang’s
v1::lower maps one to the other by moving tokens.
Upstream puts these on expr_un, one level BELOW expr_app, so
&f x is (&f) x and never &(f x). This grammar flattens
expr_un/expr_app into one node, so the prefix is an optional field
on the head (AppExpr) and on each argument (AppArg)
independently — which reproduces exactly that reading.
Variants§
Next(ExactAmpTok)
&e — quote: the value is e’s code, to run one stage later.
Prev(ExactTildeTok)
~e — splice: run e now and drop its code in here.
Trait Implementations§
Source§impl Clone for StagePrefix
impl Clone for StagePrefix
Source§fn clone(&self) -> StagePrefix
fn clone(&self) -> StagePrefix
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 StagePrefix
impl Debug for StagePrefix
Source§impl<__SyanMacro_Atom> Parse<__SyanMacro_Atom> for StagePrefixwhere
__SyanMacro_Atom: Spanned + Clone,
ExactAmpTok: Parse<__SyanMacro_Atom>,
ExactTildeTok: Parse<__SyanMacro_Atom>,
impl<__SyanMacro_Atom> Parse<__SyanMacro_Atom> for StagePrefixwhere
__SyanMacro_Atom: Spanned + Clone,
ExactAmpTok: Parse<__SyanMacro_Atom>,
ExactTildeTok: 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.