pub enum LexerErrorKind {
Show 16 variants
ExpectedExponent,
ExponentTooLarge,
ExpectedDigit,
UnescapedNewline,
UnclosedString,
UnknownEscape,
UnexpectedEof,
ExpectedHexDigit,
Expected2HexDigits,
DoesntFitIntoByte,
ExpectedUpTo3Digits,
InvalidUtf8Codepoint,
Utf8CodepointTooLarge,
UnclosedLongString,
UnrecognizedCharacter,
ExpectedChar(char),
}
Expand description
A enum of error kinds returned by the lexer.
Variants§
ExpectedExponent
Expected an exponent.
ExponentTooLarge
The exponent is too large.
ExpectedDigit
Expected a digit.
UnescapedNewline
An unescaped newline in the string literal.
UnclosedString
An unclosed string literal.
UnknownEscape
An unknown escape sequence.
UnexpectedEof
An unexpected end of file.
ExpectedHexDigit
Expected a hex digit.
Expected2HexDigits
Expected 2 hex digits.
DoesntFitIntoByte
Expected the number be less than 256.
ExpectedUpTo3Digits
Expected up to 3 decimal digits.
InvalidUtf8Codepoint
The UTF-8 codepoint is invalid.
Utf8CodepointTooLarge
The UTF-8 codepoint is too large.
UnclosedLongString
An unclosed long string.
UnrecognizedCharacter
An unrecognized character.
ExpectedChar(char)
Expected a certain character.
Trait Implementations§
Source§impl Clone for LexerErrorKind
impl Clone for LexerErrorKind
Source§fn clone(&self) -> LexerErrorKind
fn clone(&self) -> LexerErrorKind
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 Debug for LexerErrorKind
impl Debug for LexerErrorKind
Source§impl Display for LexerErrorKind
impl Display for LexerErrorKind
Source§impl Hash for LexerErrorKind
impl Hash for LexerErrorKind
Source§impl PartialEq for LexerErrorKind
impl PartialEq for LexerErrorKind
impl Copy for LexerErrorKind
impl Eq for LexerErrorKind
impl StructuralPartialEq for LexerErrorKind
Auto Trait Implementations§
impl Freeze for LexerErrorKind
impl RefUnwindSafe for LexerErrorKind
impl Send for LexerErrorKind
impl Sync for LexerErrorKind
impl Unpin for LexerErrorKind
impl UnwindSafe for LexerErrorKind
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