Enum boa_parser::error::Error
source · pub enum Error {
Expected {
expected: Box<[String]>,
found: Box<str>,
context: &'static str,
span: Span,
},
Unexpected {
message: Box<str>,
found: Box<str>,
span: Span,
},
AbruptEnd,
Lex {
err: Error,
},
General {
message: Box<str>,
position: Position,
},
}
Expand description
An enum which represents errors encountered during parsing an expression
Variants§
Expected
Fields
When it expected a certain kind of token, but got another as part of something
Unexpected
Fields
When a token is unexpected
AbruptEnd
When there is an abrupt end to the parsing
Lex
A lexing error.
General
Fields
Catch all General Error
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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