Enum LexErr
Source pub enum LexErr {
DoesNotFitU16,
DoesNotFitI16,
InvalidHex,
InvalidNumeric,
InvalidHexEmpty,
InvalidDecEmpty,
UnknownIntErr,
UnclosedStrLit,
StrLitTooBig,
InvalidReg,
InvalidSymbol,
}
Expand description
Any errors raised in attempting to tokenize an input stream.
Numeric literal (unsigned dec, hex, and bin) cannot fit within the range of a u16
Numeric literal (signed dec) cannot fit within the range of a i16
Hex literal (starting with x) has invalid hex digits
Numeric literal could not be parsed as a decimal literal because it has invalid digits (i.e., not 0-9)
Hex literal (starting with x) doesn’t have digits after it.
Numeric literal could not be parsed as a decimal literal because there are no digits in it (it’s just # or #-)
Int parsing failed but the reason why is unknown
String literal is missing an end quotation mark.
String literal is larger than the maximum string size (u16::MAX - 1).
Token had the format R\d, but \d isn’t 0-7.
A symbol was used which is not allowed in LC3 assembly files
Performs copy-assignment from
source.
Read more
Formats the value using the given formatter.
Read more
Returns the “default value” for a type.
Read more
Formats the value using the given formatter.
Read more
Returns the lower-level source of this error, if any.
Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports.
Read more
A clarifying message to help aid someone in how to fix the message.
Read more
The range where this error occurs in source.
Read more
Tests for self and other values to be equal, and is used by ==.
Tests for !=. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more
Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
Converts the given value to a
String.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.