Enum sway_parse::token::LexErrorKind
source · [−]pub enum LexErrorKind {
Show 18 variants
UnclosedMultilineComment {
unclosed_indices: Vec<usize>,
},
UnexpectedCloseDelimiter {
position: usize,
close_delimiter: Delimiter,
},
MismatchedDelimiters {
open_position: usize,
close_position: usize,
open_delimiter: Delimiter,
close_delimiter: Delimiter,
},
UnclosedDelimiter {
open_position: usize,
open_delimiter: Delimiter,
},
UnclosedStringLiteral {
position: usize,
},
UnclosedCharLiteral {
position: usize,
},
ExpectedCloseQuote {
position: usize,
},
IncompleteHexIntLiteral {
position: usize,
},
IncompleteBinaryIntLiteral {
position: usize,
},
IncompleteOctalIntLiteral {
position: usize,
},
InvalidIntSuffix {
suffix: Ident,
},
InvalidCharacter {
position: usize,
character: char,
},
InvalidHexEscape,
UnicodeEscapeMissingBrace {
position: usize,
},
InvalidUnicodeEscapeDigit {
position: usize,
},
UnicodeEscapeOutOfRange {
position: usize,
},
UnicodeEscapeInvalidCharValue {
span: Span,
},
InvalidEscapeCode {
position: usize,
},
}
Variants
UnclosedMultilineComment
UnexpectedCloseDelimiter
MismatchedDelimiters
UnclosedDelimiter
UnclosedStringLiteral
Fields
position: usize
UnclosedCharLiteral
Fields
position: usize
ExpectedCloseQuote
Fields
position: usize
IncompleteHexIntLiteral
Fields
position: usize
IncompleteBinaryIntLiteral
Fields
position: usize
IncompleteOctalIntLiteral
Fields
position: usize
InvalidIntSuffix
Fields
suffix: Ident
InvalidCharacter
InvalidHexEscape
UnicodeEscapeMissingBrace
Fields
position: usize
InvalidUnicodeEscapeDigit
Fields
position: usize
UnicodeEscapeOutOfRange
Fields
position: usize
UnicodeEscapeInvalidCharValue
Fields
span: Span
InvalidEscapeCode
Fields
position: usize
Trait Implementations
sourceimpl Clone for LexErrorKind
impl Clone for LexErrorKind
sourcefn clone(&self) -> LexErrorKind
fn clone(&self) -> LexErrorKind
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for LexErrorKind
impl Debug for LexErrorKind
sourceimpl Display for LexErrorKind
impl Display for LexErrorKind
sourceimpl Error for LexErrorKind
impl Error for LexErrorKind
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
🔬 This is a nightly-only experimental API. (
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl Hash for LexErrorKind
impl Hash for LexErrorKind
sourceimpl PartialEq<LexErrorKind> for LexErrorKind
impl PartialEq<LexErrorKind> for LexErrorKind
sourcefn eq(&self, other: &LexErrorKind) -> bool
fn eq(&self, other: &LexErrorKind) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &LexErrorKind) -> bool
fn ne(&self, other: &LexErrorKind) -> bool
This method tests for !=
.
sourceimpl PartialOrd<LexErrorKind> for LexErrorKind
impl PartialOrd<LexErrorKind> for LexErrorKind
sourcefn partial_cmp(&self, other: &LexErrorKind) -> Option<Ordering>
fn partial_cmp(&self, other: &LexErrorKind) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for LexErrorKind
impl StructuralEq for LexErrorKind
impl StructuralPartialEq for LexErrorKind
Auto Trait Implementations
impl RefUnwindSafe for LexErrorKind
impl Send for LexErrorKind
impl Sync for LexErrorKind
impl Unpin for LexErrorKind
impl UnwindSafe for LexErrorKind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more