pub enum Expr {
Alt {
alts: Vec<Expr>,
},
Seq {
items: Vec<Expr>,
},
Match {
arms: Vec<Expr>,
},
Repeat {
min: Option<u64>,
max: Option<u64>,
body: Box<Expr>,
},
Optional {
body: Box<Expr>,
},
Ref {
name: String,
span: Span,
},
Literal {
value: String,
span: Span,
},
Group {
body: Box<Expr>,
},
}Variants§
Alt
Alternatives separated by |.
Seq
Juxtaposed sequence.
Match
match a | b | c — first-class choice of match arms.
Repeat
repeat { ... } or repeat(0..) { ... }
Optional
optional { ... }
Ref
Reference to a rule or token name.
Literal
String literal (auto-inferred token).
Group
Implementations§
Trait Implementations§
impl Eq for Expr
impl StructuralPartialEq for Expr
Auto Trait Implementations§
impl Freeze for Expr
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnsafeUnpin for Expr
impl UnwindSafe for Expr
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