pub enum ParserError {
ExpectedFound {
span: Span,
found: Option<char>,
},
InvalidInt {
span: Span,
inner: ParseBigIntError,
},
TooBigInteger {
span: Span,
},
InvalidStackRegister {
span: Span,
inner: Error,
},
InvalidControlRegister {
span: Span,
inner: Error,
},
InvalidSlice {
span: Span,
inner: Error,
},
InvalidCell {
span: Span,
inner: Error,
},
InvalidLibrary {
span: Span,
inner: Error,
},
InvalidMethodId {
span: Span,
inner: Error,
},
InvalidName {
span: Span,
inner: Error,
},
UnknownError,
}
Variants§
ExpectedFound
InvalidInt
TooBigInteger
InvalidStackRegister
InvalidControlRegister
InvalidSlice
InvalidCell
InvalidLibrary
InvalidMethodId
InvalidName
UnknownError
Implementations§
Trait Implementations§
Source§impl Debug for ParserError
impl Debug for ParserError
Source§impl Display for ParserError
impl Display for ParserError
Source§impl<'a> Error<'a, &'a str> for ParserError
impl<'a> Error<'a, &'a str> for ParserError
Source§impl Error for ParserError
impl Error for ParserError
1.30.0 · 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()
Source§impl<'a> LabelError<'a, &'a str, DefaultExpected<'a, char>> for ParserError
impl<'a> LabelError<'a, &'a str, DefaultExpected<'a, char>> for ParserError
Source§fn expected_found<Iter: IntoIterator<Item = DefaultExpected<'a, char>>>(
_: Iter,
found: Option<MaybeRef<'a, char>>,
span: Span,
) -> Self
fn expected_found<Iter: IntoIterator<Item = DefaultExpected<'a, char>>>( _: Iter, found: Option<MaybeRef<'a, char>>, span: Span, ) -> Self
Create a new error describing a conflict between expected inputs and that which was actually found. Read more
Source§fn merge_expected_found<E>(
self,
expected: E,
found: Option<Maybe<<I as Input<'src>>::Token, &'src <I as Input<'src>>::Token>>,
span: <I as Input<'src>>::Span,
) -> Selfwhere
E: IntoIterator<Item = L>,
Self: Error<'src, I>,
fn merge_expected_found<E>(
self,
expected: E,
found: Option<Maybe<<I as Input<'src>>::Token, &'src <I as Input<'src>>::Token>>,
span: <I as Input<'src>>::Span,
) -> Selfwhere
E: IntoIterator<Item = L>,
Self: Error<'src, I>,
Fast path for
a.merge(LabelError::expected_found(...))
that may incur less overhead by, for example, reusing allocations.Source§fn replace_expected_found<E>(
self,
expected: E,
found: Option<Maybe<<I as Input<'src>>::Token, &'src <I as Input<'src>>::Token>>,
span: <I as Input<'src>>::Span,
) -> Selfwhere
E: IntoIterator<Item = L>,
fn replace_expected_found<E>(
self,
expected: E,
found: Option<Maybe<<I as Input<'src>>::Token, &'src <I as Input<'src>>::Token>>,
span: <I as Input<'src>>::Span,
) -> Selfwhere
E: IntoIterator<Item = L>,
Fast path for
a = LabelError::expected_found(...)
that may incur less overhead by, for example, reusing allocations.Source§fn label_with(&mut self, label: L)
fn label_with(&mut self, label: L)
Annotate the expected patterns within this parser with the given label. Read more
Source§impl<'a> LabelError<'a, &'a str, Maybe<char, &'a char>> for ParserError
impl<'a> LabelError<'a, &'a str, Maybe<char, &'a char>> for ParserError
Source§fn expected_found<Iter: IntoIterator<Item = MaybeRef<'a, char>>>(
_: Iter,
found: Option<MaybeRef<'a, char>>,
span: Span,
) -> Self
fn expected_found<Iter: IntoIterator<Item = MaybeRef<'a, char>>>( _: Iter, found: Option<MaybeRef<'a, char>>, span: Span, ) -> Self
Create a new error describing a conflict between expected inputs and that which was actually found. Read more
Source§fn merge_expected_found<E>(
self,
expected: E,
found: Option<Maybe<<I as Input<'src>>::Token, &'src <I as Input<'src>>::Token>>,
span: <I as Input<'src>>::Span,
) -> Selfwhere
E: IntoIterator<Item = L>,
Self: Error<'src, I>,
fn merge_expected_found<E>(
self,
expected: E,
found: Option<Maybe<<I as Input<'src>>::Token, &'src <I as Input<'src>>::Token>>,
span: <I as Input<'src>>::Span,
) -> Selfwhere
E: IntoIterator<Item = L>,
Self: Error<'src, I>,
Fast path for
a.merge(LabelError::expected_found(...))
that may incur less overhead by, for example, reusing allocations.Source§fn replace_expected_found<E>(
self,
expected: E,
found: Option<Maybe<<I as Input<'src>>::Token, &'src <I as Input<'src>>::Token>>,
span: <I as Input<'src>>::Span,
) -> Selfwhere
E: IntoIterator<Item = L>,
fn replace_expected_found<E>(
self,
expected: E,
found: Option<Maybe<<I as Input<'src>>::Token, &'src <I as Input<'src>>::Token>>,
span: <I as Input<'src>>::Span,
) -> Selfwhere
E: IntoIterator<Item = L>,
Fast path for
a = LabelError::expected_found(...)
that may incur less overhead by, for example, reusing allocations.Source§fn label_with(&mut self, label: L)
fn label_with(&mut self, label: L)
Annotate the expected patterns within this parser with the given label. Read more
Source§impl<'a> LabelError<'a, &'a str, TextExpected<'a, &'a str>> for ParserError
impl<'a> LabelError<'a, &'a str, TextExpected<'a, &'a str>> for ParserError
Source§fn expected_found<Iter: IntoIterator<Item = TextExpected<'a, &'a str>>>(
_: Iter,
found: Option<MaybeRef<'a, char>>,
span: Span,
) -> Self
fn expected_found<Iter: IntoIterator<Item = TextExpected<'a, &'a str>>>( _: Iter, found: Option<MaybeRef<'a, char>>, span: Span, ) -> Self
Create a new error describing a conflict between expected inputs and that which was actually found. Read more
Source§fn merge_expected_found<E>(
self,
expected: E,
found: Option<Maybe<<I as Input<'src>>::Token, &'src <I as Input<'src>>::Token>>,
span: <I as Input<'src>>::Span,
) -> Selfwhere
E: IntoIterator<Item = L>,
Self: Error<'src, I>,
fn merge_expected_found<E>(
self,
expected: E,
found: Option<Maybe<<I as Input<'src>>::Token, &'src <I as Input<'src>>::Token>>,
span: <I as Input<'src>>::Span,
) -> Selfwhere
E: IntoIterator<Item = L>,
Self: Error<'src, I>,
Fast path for
a.merge(LabelError::expected_found(...))
that may incur less overhead by, for example, reusing allocations.Source§fn replace_expected_found<E>(
self,
expected: E,
found: Option<Maybe<<I as Input<'src>>::Token, &'src <I as Input<'src>>::Token>>,
span: <I as Input<'src>>::Span,
) -> Selfwhere
E: IntoIterator<Item = L>,
fn replace_expected_found<E>(
self,
expected: E,
found: Option<Maybe<<I as Input<'src>>::Token, &'src <I as Input<'src>>::Token>>,
span: <I as Input<'src>>::Span,
) -> Selfwhere
E: IntoIterator<Item = L>,
Fast path for
a = LabelError::expected_found(...)
that may incur less overhead by, for example, reusing allocations.Source§fn label_with(&mut self, label: L)
fn label_with(&mut self, label: L)
Annotate the expected patterns within this parser with the given label. Read more
Auto Trait Implementations§
impl Freeze for ParserError
impl RefUnwindSafe for ParserError
impl Send for ParserError
impl Sync for ParserError
impl Unpin for ParserError
impl UnwindSafe for ParserError
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more