pub enum Terminal {
Error {
msg: String,
tok: usize,
},
Token(usize),
}Expand description
Represents a terminal (token).
Token may be pointed directly (Token variant) or wrapped together
with the error message (Error variant).
Variants§
Error
Represents a token that caused the syntax error.
msg: error messagetok: index of the corresponding token from theTokenCollection
Token(usize)
Represents normal (expected) token. Contains an index of the
corresponding token from the TokenCollection
Implementations§
Trait Implementations§
source§impl PartialEq for Terminal
impl PartialEq for Terminal
impl StructuralPartialEq for Terminal
Auto Trait Implementations§
impl RefUnwindSafe for Terminal
impl Send for Terminal
impl Sync for Terminal
impl Unpin for Terminal
impl UnwindSafe for Terminal
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