Enum wast::lexer::LexError [−][src]
Errors that can be generated while lexing.
All lexing errors have line/colum/position information as well as a
LexError
indicating what kind of error happened while lexing.
Variants
A dangling block comment was found with an unbalanced (;
which was
never terminated in the file.
Unexpected(char)
An unexpected character was encountered when generally parsing and looking for something else.
InvalidStringElement(char)
An invalid char
in a string literal was found.
InvalidStringEscape(char)
An invalid string escape letter was found (the thing after the \
in
string literals)
InvalidHexDigit(char)
An invalid hexadecimal digit was found.
InvalidDigit(char)
An invalid base-10 digit was found.
Parsing expected wanted
but ended up finding found
instead where the
two characters aren’t the same.
Fields of Expected
We needed to parse more but EOF (or end of the string) was encountered.
A number failed to parse because it was too big to fit within the target type.
InvalidUnicodeValue(u32)
An invalid unicode value was found in a \u{...}
escape in a string,
only valid unicode scalars can be escaped that way.
A lone underscore was found when parsing a number, since underscores should always be preceded and succeeded with a digit of some form.
Trait Implementations
impl Clone for LexError
[src]
impl Debug for LexError
[src]
impl Display for LexError
[src]
impl PartialEq<LexError> for LexError
[src]
impl StructuralPartialEq for LexError
[src]
Auto Trait Implementations
impl RefUnwindSafe for LexError
impl Send for LexError
impl Sync for LexError
impl Unpin for LexError
impl UnwindSafe for LexError
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,