[][src]Trait parze::error::ParseError

pub trait ParseError<'a, T: Clone + 'a>: Sized {
    fn unexpected(token: T) -> Self;
fn unexpected_end() -> Self; fn combine(self, _other: Self) -> Self { ... } }

A trait to be implemented by parser errors. The default implementation of this trait is DefaultParseError. You may implement it yourself to have custom errors be generated by the parser.

Required methods

fn unexpected(token: T) -> Self

Create an error that indicates that the given symbol was not expected by the parser.

fn unexpected_end() -> Self

Create an error that indicates that the symbol input unexpectedly ended.

Loading content...

Provided methods

fn combine(self, _other: Self) -> Self

Combine two errors of equal priority

Loading content...

Implementors

impl<'a, T: Clone + 'a> ParseError<'a, T> for DefaultParseError<T>[src]

Loading content...