GeezerVison is showing docs.rs — ParseErrorType in rustpython_parser - Rust pub enum ParseErrorType {
Eof,
ExtraToken(Tok),
InvalidToken,
UnrecognizedToken(Tok, Option<String>),
Lexical(LexicalErrorType),
}
Expand descriptionRepresents the different types of errors that can occur during parsing.
Variants§Parser encountered an unexpected end of input
Parser encountered an extra token
Parser encountered an invalid token
Parser encountered an unexpected token
Parser encountered an error during lexing.
Implementations§
Returns true if the error is an indentation error.
Returns true if the error is a tab error.
Trait Implementations§
Formats the value using the given formatter. 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
Auto Trait Implementations§Blanket Implementations§
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. 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.
Returns the String produced by Ts Debug implementation.
§Examples
use malachite_base::strings::ToDebugString;
assert_eq!([1, 2, 3].to_debug_string(), "[1, 2, 3]");
assert_eq!(
[vec![2, 3], vec![], vec![4]].to_debug_string(),
"[[2, 3], [], [4]]"
);
assert_eq!(Some(5).to_debug_string(), "Some(5)");
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.
|