pub enum StagePrefix {
Next(ExactAmpTok),
Prev(ExactTildeTok),
}Expand description
A staging prefix on a nxunsub operand: &e builds code for the next
stage, ~e splices the result of a previous-stage computation
(parser.mly:796-797, UTNext/UTPrev).
Upstream spells these as alternatives of nxunsub, alongside the !
deref; this grammar flattens that level, so like minus/excl they
become an optional prefix field. The looser shape accepts a few
combinations upstream’s grammar does not (&!x), which is the same
latitude AppExpr already takes for -!x.
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
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>
Every error must be convertible to the universal one, so a field’s failure can become the
enclosing type’s failure with no per-field where-predicate. Stating it HERE rather than at
each derived impl is what keeps it out of the obligation graph: a per-field
<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.Source§fn parse_stream<__SyanMacro_S: ParseStream<Atom = __SyanMacro_Atom>>(
__syan_stream: &mut __SyanMacro_S,
) -> Result<Self, Self::Error>
fn parse_stream<__SyanMacro_S: ParseStream<Atom = __SyanMacro_Atom>>( __syan_stream: &mut __SyanMacro_S, ) -> Result<Self, Self::Error>
Parse from a reborrowable stream. Read more
Source§impl PartialEq for StagePrefix
impl PartialEq for StagePrefix
impl StructuralPartialEq for StagePrefix
Source§impl<__SyanMacro_Atom> Unparse<__SyanMacro_Atom> for StagePrefix
impl<__SyanMacro_Atom> Unparse<__SyanMacro_Atom> for StagePrefix
Auto Trait Implementations§
impl Freeze for StagePrefix
impl RefUnwindSafe for StagePrefix
impl Send for StagePrefix
impl Sync for StagePrefix
impl Unpin for StagePrefix
impl UnsafeUnpin for StagePrefix
impl UnwindSafe for StagePrefix
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more