pub enum LexError<F: Fail> {
InvalidCharacter(char),
InvalidToken(String),
InputError(F),
}
Expand description
The error type for the lexers produced by Lexer implementations.
Variants§
InvalidCharacter(char)
The lexer encountered an invalid chararter in the input. This error occurs when the invalid character would be the first character of a new token.
InvalidToken(String)
The lexer encountered an invalid token in the input. This error occurs when the lexer has consumed some valid characters but cannot make further progress and the consumed characters do not form a valid token.
InputError(F)
The lexer encountered an error in the input stream.
Trait Implementations§
Source§impl<F: Fail> Fail for LexError<F>
impl<F: Fail> Fail for LexError<F>
Source§fn cause(&self) -> Option<&dyn Fail>
fn cause(&self) -> Option<&dyn Fail>
Returns a reference to the underlying cause of this failure, if it
is an error that wraps other errors. Read more
Source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the
Backtrace
carried by this failure, if it
carries one. Read moreAuto Trait Implementations§
impl<F> Freeze for LexError<F>where
F: Freeze,
impl<F> RefUnwindSafe for LexError<F>where
F: RefUnwindSafe,
impl<F> Send for LexError<F>
impl<F> Sync for LexError<F>
impl<F> Unpin for LexError<F>where
F: Unpin,
impl<F> UnwindSafe for LexError<F>where
F: 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