Enum wagon_parser::parser::WagParseError
source · pub enum WagParseError {
Unexpected {
span: Span,
offender: Tokens,
expected: Vec<String>,
},
Fatal((Span, String)),
CheckError(WagCheckError),
LexError(LexingError),
FloatError(FloatIsNan, Span),
RegexError(Box<BuildError>, Span, String),
}
Expand description
Any of the various errors that can occur during parsing.
Variants§
Unexpected
Fields
An unexpected character was encountered.
Fatal((Span, String))
Something horrible happened that we do not have a specific error for.
CheckError(WagCheckError)
A wrapper around WagCheckError
.
LexError(LexingError)
A wrapper around LexingError
.
FloatError(FloatIsNan, Span)
Expected a float but got a NaN
RegexError(Box<BuildError>, Span, String)
Non-valid regex
Trait Implementations§
source§impl Debug for WagParseError
impl Debug for WagParseError
source§impl Display for WagParseError
impl Display for WagParseError
source§impl Error for WagParseError
impl Error for WagParseError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
source§impl ErrorReport for WagParseError
impl ErrorReport for WagParseError
source§impl From<LexingError> for WagParseError
impl From<LexingError> for WagParseError
source§fn from(value: LexingError) -> Self
fn from(value: LexingError) -> Self
Converts to this type from the input type.
source§impl From<WagCheckError> for WagParseError
impl From<WagCheckError> for WagParseError
source§fn from(value: WagCheckError) -> Self
fn from(value: WagCheckError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for WagParseError
impl RefUnwindSafe for WagParseError
impl Send for WagParseError
impl Sync for WagParseError
impl Unpin for WagParseError
impl UnwindSafe for WagParseError
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