pub enum Atom {
Terminal(Lit),
NonTerminal(Ident),
Sub(Box<Production>),
Choice(Box<Production>, Vec<Production>),
Repeat(Box<Atom>),
Repeat1(Box<Atom>),
Optional(Box<Atom>),
LookAhead(Box<Atom>),
LookAheadNot(Box<Atom>),
}
Expand description
Atom ::= '(' Production ')'
| '[' Production ('|' Production)* ']'
| Terminal
| NonTerminal
Variants§
Terminal(Lit)
NonTerminal(Ident)
Sub(Box<Production>)
Choice(Box<Production>, Vec<Production>)
Repeat(Box<Atom>)
Repeat1(Box<Atom>)
Optional(Box<Atom>)
LookAhead(Box<Atom>)
LookAheadNot(Box<Atom>)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Atom
impl RefUnwindSafe for Atom
impl !Send for Atom
impl !Sync for Atom
impl Unpin for Atom
impl UnwindSafe for Atom
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