pub enum RecordBody {
Update {
base: ExprErased,
with_kw: KwWith,
fields: Vec<RecordField>,
},
Fields(Vec<RecordField>),
}Expand description
(| … |)’s content: either a plain field list, or a record update
base with l = e; … (nxrecordsynt’s third alternative). Update
is tried first (it backtracks cleanly to Fields — parsing base
as an expression stops right before a bare label = expr’s =,
since = isn’t a valid expression continuation, so the with
keyword check fails fast and Fields picks it up). base is
nxbot in parser.mly (an atomic expression); routed through
ExprErased here instead, which is strictly more permissive
(accepts any expression as the base, not just an atomic one) — a
deliberate simplification, and also the only way to reference it
without adding a second, non-Group recursion edge into Atomic
(which — like AppExpr/OpChain — is not itself part of Expr’s
SCC, and should stay that way).
Variants§
Trait Implementations§
Source§impl Clone for RecordBody
impl Clone for RecordBody
Source§fn clone(&self) -> RecordBody
fn clone(&self) -> RecordBody
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 RecordBody
impl Debug for RecordBody
Source§impl<__SyanMacro_Atom> Parse<__SyanMacro_Atom> for RecordBodywhere
__SyanMacro_Atom: Spanned + Clone,
ExprErased: Parse<__SyanMacro_Atom>,
KwWith: Parse<__SyanMacro_Atom>,
Vec<RecordField>: Parse<__SyanMacro_Atom>,
impl<__SyanMacro_Atom> Parse<__SyanMacro_Atom> for RecordBodywhere
__SyanMacro_Atom: Spanned + Clone,
ExprErased: Parse<__SyanMacro_Atom>,
KwWith: Parse<__SyanMacro_Atom>,
Vec<RecordField>: 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.