pub enum Expression<'a> {
Variable {
key: Key,
location: TextLocation,
},
Terminal {
regex: Symbol,
options: TerminalOptions<'a>,
location: TextLocation,
},
Passive {
expression: &'a Expression<'a>,
location: TextLocation,
},
Repetition {
expression: &'a Expression<'a>,
location: TextLocation,
},
Optional {
expression: &'a Expression<'a>,
location: TextLocation,
},
Alternation {
expressions: &'a [Expression<'a>],
location: TextLocation,
},
Concatenation {
expressions: &'a [Expression<'a>],
location: TextLocation,
},
}
Variants§
Implementations§
Source§impl<'a> Expression<'a>
impl<'a> Expression<'a>
pub fn with_compiler( &'a self, compiler: &'a Compiler, ) -> ExpressionWithCompiler<'a>
Trait Implementations§
Source§impl<'a> Clone for Expression<'a>
impl<'a> Clone for Expression<'a>
Source§fn clone(&self) -> Expression<'a>
fn clone(&self) -> Expression<'a>
Returns a duplicate 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<'a> Debug for Expression<'a>
impl<'a> Debug for Expression<'a>
Source§impl Hash for Expression<'_>
impl Hash for Expression<'_>
Source§impl PartialEq for Expression<'_>
impl PartialEq for Expression<'_>
impl Eq for Expression<'_>
Auto Trait Implementations§
impl<'a> Freeze for Expression<'a>
impl<'a> RefUnwindSafe for Expression<'a>
impl<'a> Send for Expression<'a>
impl<'a> Sync for Expression<'a>
impl<'a> Unpin for Expression<'a>
impl<'a> UnwindSafe for Expression<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.