#[non_exhaustive]pub enum LexError {
UnexpectedCharacter,
BadString,
UnterminatedComment,
}Expand description
Why a token is a lexical error. SANY’s token manager would throw a
TokenMgrError when it reaches such a token.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnexpectedCharacter
A character no token can start with.
BadString
A string literal with a bad escape, or no closing quote on its line.
UnterminatedComment
A block comment still open at end of input.
Trait Implementations§
impl Copy for LexError
impl Eq for LexError
impl StructuralPartialEq for LexError
Auto Trait Implementations§
impl Forget for LexError
impl Freeze for LexError
impl Move for LexError
impl RefUnwindSafe for LexError
impl Send for LexError
impl Sync for LexError
impl Unpin for LexError
impl UnsafeUnpin for LexError
impl UnwindSafe for LexError
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