pub enum NativeParseError {
Lex(LexError),
Tokenize(CellStreamError),
Unexpected {
found: String,
expected: &'static str,
span: Span,
},
MissingOperand {
operator: String,
span: Span,
},
NewlineInApplication {
span: Span,
},
InvalidAssignmentTarget {
span: Span,
},
InvalidLambdaArguments {
span: Span,
},
Unsupported {
syntax: String,
span: Span,
},
}Expand description
An error produced by the native lexer or precedence parser.
Variants§
Lex(LexError)
Tokenization failed before parsing began.
Tokenize(CellStreamError)
The raw token stream could not be partitioned into complete cells.
Unexpected
The parser encountered a token that cannot occur in this position.
Fields
MissingOperand
A prefix or binary operator has no operand.
NewlineInApplication
Implicit function application crossed a top-level line break.
InvalidAssignmentTarget
The left side of an assignment is not assignable.
InvalidLambdaArguments
The left side of a lambda arrow is not an argument form.
Unsupported
The grammar recognizes syntax that this native backend cannot lower yet.
Trait Implementations§
Source§impl Debug for NativeParseError
impl Debug for NativeParseError
Source§impl Display for NativeParseError
impl Display for NativeParseError
Source§impl Error for NativeParseError
impl Error for NativeParseError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for NativeParseError
impl RefUnwindSafe for NativeParseError
impl Send for NativeParseError
impl Sync for NativeParseError
impl Unpin for NativeParseError
impl UnsafeUnpin for NativeParseError
impl UnwindSafe for NativeParseError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more