Enum quad_compat_rhai::LexError [−][src]
#[non_exhaustive]
pub enum LexError {
UnexpectedInput(String),
UnterminatedString,
StringTooLong(usize),
MalformedEscapeSequence(String),
MalformedNumber(String),
MalformedChar(String),
MalformedIdentifier(String),
ImproperSymbol(String, String),
}
Expand description
(internals) Error encountered when tokenizing the script text.
Exported under the internals
feature only.
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.
UnexpectedInput(String)
Tuple Fields
0: String
An unexpected symbol is encountered when tokenizing the script text.
UnterminatedString
A string literal is not terminated before a new-line or EOF.
StringTooLong(usize)
Tuple Fields
0: usize
An identifier is in an invalid format.
MalformedEscapeSequence(String)
Tuple Fields
0: String
An string/character/numeric escape sequence is in an invalid format.
MalformedNumber(String)
Tuple Fields
0: String
An numeric literal is in an invalid format.
MalformedChar(String)
Tuple Fields
0: String
An character literal is in an invalid format.
MalformedIdentifier(String)
Tuple Fields
0: String
An identifier is in an invalid format.
ImproperSymbol(String, String)
Bad symbol encountered when tokenizing the script text.
Implementations
Convert a LexError
into a ParseError
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for LexError
impl UnwindSafe for LexError
Blanket Implementations
Mutably borrows from an owned value. Read more