Enum wagon_parser::firstpass::WagCheckError
source · pub enum WagCheckError {
DuplicateParameters(String, SpannableNode<Ident>),
DisparateParameters {
terminal: String,
offender: Vec<SpannableNode<Ident>>,
expected: Vec<SpannableNode<Ident>>,
span: Span,
},
}
Expand description
Any error that can occur during the rewriting/checking process.
Variants§
DuplicateParameters(String, SpannableNode<Ident>)
A rule wants multiple parameters, but they are the exact same.
DisparateParameters
Fields
§
offender: Vec<SpannableNode<Ident>>
The specific Ident
which caused the issue.
§
expected: Vec<SpannableNode<Ident>>
The Ident
we expected to see.
Two alternative instances of a rule want different parameters.
Trait Implementations§
source§impl Debug for WagCheckError
impl Debug for WagCheckError
source§impl Display for WagCheckError
impl Display for WagCheckError
source§impl Error for WagCheckError
impl Error for WagCheckError
1.30.0 · 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 WagCheckError
impl ErrorReport for WagCheckError
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.
source§impl PartialEq for WagCheckError
impl PartialEq for WagCheckError
source§fn eq(&self, other: &WagCheckError) -> bool
fn eq(&self, other: &WagCheckError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for WagCheckError
impl StructuralPartialEq for WagCheckError
Auto Trait Implementations§
impl Freeze for WagCheckError
impl RefUnwindSafe for WagCheckError
impl Send for WagCheckError
impl Sync for WagCheckError
impl Unpin for WagCheckError
impl UnwindSafe for WagCheckError
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.