pub enum PegExpr {
Char(char),
Any,
Seq(Box<PegExpr>, Box<PegExpr>),
Choice(Box<PegExpr>, Box<PegExpr>),
Star(Box<PegExpr>),
Plus(Box<PegExpr>),
Optional(Box<PegExpr>),
Not(Box<PegExpr>),
And(Box<PegExpr>),
}Expand description
A runtime PEG expression.
Variants§
Char(char)
Match a literal character.
Any
Match any character.
Seq(Box<PegExpr>, Box<PegExpr>)
Sequence: e1 followed by e2.
Choice(Box<PegExpr>, Box<PegExpr>)
Ordered choice: try e1, if it fails (without consuming input) try e2.
Star(Box<PegExpr>)
Zero or more: e*
Plus(Box<PegExpr>)
One or more: e+
Optional(Box<PegExpr>)
Optional: e?
Not(Box<PegExpr>)
Negative lookahead: !e
And(Box<PegExpr>)
Positive lookahead: &e
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PegExpr
impl RefUnwindSafe for PegExpr
impl Send for PegExpr
impl Sync for PegExpr
impl Unpin for PegExpr
impl UnsafeUnpin for PegExpr
impl UnwindSafe for PegExpr
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