pub enum Value {
None,
Term(Term),
Index(usize),
}Expand description
Represents a generic value emitted by the lexer.
Value encapsulates auxiliary data produced during lexing, such as parsed
terms or indices into the parser’s term stack.
§Variants
Value::None— Indicates absence of a value.Value::Term— Wraps a parsedTerminstance.Value::Index— Holds a numeric index to terms stackTermsParserDriver::terms.
Variants§
Trait Implementations§
Source§impl TryFrom<Value> for Option<Term>
impl TryFrom<Value> for Option<Term>
Source§type Error = ParlexError
type Error = ParlexError
The type returned in the event of a conversion error.
Source§impl TryFrom<Value> for Term
impl TryFrom<Value> for Term
Source§type Error = ParlexError
type Error = ParlexError
The type returned in the event of a conversion error.
Source§impl TryFrom<Value> for usize
impl TryFrom<Value> for usize
Source§type Error = ParlexError
type Error = ParlexError
The type returned in the event of a conversion error.
impl Copy for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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