pub enum Expression<N, T> {
TokenKind {
token_kind: T,
},
Nonterminal {
nonterminal: N,
},
Alternation {
expressions: Vec<Expression<N, T>>,
},
Concatenation {
expressions: Vec<Expression<N, T>>,
},
Repetition {
expression: Box<Expression<N, T>>,
min: Option<u32>,
max: Option<u32>,
},
}
Variants§
TokenKind
Fields
§
token_kind: T
Nonterminal
Fields
§
nonterminal: N
Alternation
Fields
§
expressions: Vec<Expression<N, T>>
Concatenation
Fields
§
expressions: Vec<Expression<N, T>>
Repetition
Implementations§
Trait Implementations§
Source§impl<N, T> Clone for Expression<N, T>
impl<N, T> Clone for Expression<N, T>
Source§fn clone(&self) -> Expression<N, T>
fn clone(&self) -> Expression<N, T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<N, T> Debug for Expression<N, T>
impl<N, T> Debug for Expression<N, T>
Source§impl<N, T> Ord for Expression<N, T>
impl<N, T> Ord for Expression<N, T>
Source§fn cmp(&self, other: &Expression<N, T>) -> Ordering
fn cmp(&self, other: &Expression<N, T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<N, T> PartialEq for Expression<N, T>
impl<N, T> PartialEq for Expression<N, T>
Source§impl<N, T> PartialOrd for Expression<N, T>where
N: PartialOrd,
T: PartialOrd,
impl<N, T> PartialOrd for Expression<N, T>where
N: PartialOrd,
T: PartialOrd,
impl<N, T> Eq for Expression<N, T>
impl<N, T> StructuralPartialEq for Expression<N, T>
Auto Trait Implementations§
impl<N, T> Freeze for Expression<N, T>
impl<N, T> RefUnwindSafe for Expression<N, T>where
T: RefUnwindSafe,
N: RefUnwindSafe,
impl<N, T> Send for Expression<N, T>
impl<N, T> Sync for Expression<N, T>
impl<N, T> Unpin for Expression<N, T>
impl<N, T> UnwindSafe for Expression<N, T>where
T: UnwindSafe,
N: UnwindSafe,
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