Enum sbnf::compiler::interpreter::Expression
source · pub enum Expression<'a> {
Variable {
key: Key,
location: TextLocation,
},
Terminal {
regex: Symbol,
options: TerminalOptions,
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<'_>
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 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<'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> 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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.