pub enum Production {
Terminal(TerminalAtom),
Seq(Vec<Production>),
Alt(Vec<Production>),
Repeat {
inner: Box<Production>,
at_least: usize,
},
Call {
head: Box<Production>,
args: Vec<Production>,
},
Ref(Symbol),
}Expand description
A codec-neutral grammar production.
Variants§
Terminal(TerminalAtom)
A literal or lexeme class named abstractly; renderers supply concrete terminals for the requested codec surface.
Seq(Vec<Production>)
Ordered child productions.
Alt(Vec<Production>)
One-of-many child productions.
Repeat
Repetition of an inner production.
Fields
§
inner: Box<Production>The repeated production.
Call
A call-like form with a head and positional argument productions.
Fields
§
head: Box<Production>The rendered call head.
§
args: Vec<Production>The rendered positional arguments.
Ref(Symbol)
Reference to a named production in the graph definitions.
Trait Implementations§
Source§impl Clone for Production
impl Clone for Production
Source§fn clone(&self) -> Production
fn clone(&self) -> Production
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 Production
impl Debug for Production
impl Eq for Production
Source§impl PartialEq for Production
impl PartialEq for Production
impl StructuralPartialEq for Production
Auto Trait Implementations§
impl Freeze for Production
impl RefUnwindSafe for Production
impl Send for Production
impl Sync for Production
impl Unpin for Production
impl UnsafeUnpin for Production
impl UnwindSafe for Production
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