Enum hoodlum_parser::ParseError [] [src]

pub enum ParseError<L, T, E> {
    InvalidToken {
        location: L,
    },
    UnrecognizedToken {
        token: Option<(L, T, L)>,
        expected: Vec<String>,
    },
    ExtraToken {
        token: (L, T, L),
    },
    User {
        error: E,
    },
}

Variants

Generated by the parser when it encounters a token (or EOF) it did not expect.

Fields of InvalidToken

Generated by the parser when it encounters a token (or EOF) it did not expect.

Fields of UnrecognizedToken

If this is Some, then an unexpected token of type T was observed, with a span given by the two L values. If this is None, then EOF was observed when it was not expected.

The set of expected tokens: these names are taken from the grammar and hence may not necessarily be suitable for presenting to the user.

Generated by the parser when it encounters additional, unexpected tokens.

Fields of ExtraToken

Custom error type.

Fields of User

Trait Implementations

impl<L, T, E> PartialOrd<ParseError<L, T, E>> for ParseError<L, T, E> where
    E: PartialOrd<E>,
    L: PartialOrd<L>,
    T: PartialOrd<T>, 
[src]

impl<L, T, E> Display for ParseError<L, T, E> where
    E: Display,
    L: Display,
    T: Display
[src]

impl<L, T, E> Error for ParseError<L, T, E> where
    E: Debug + Display,
    L: Debug + Display,
    T: Debug + Display
[src]

impl<L, T, E> Ord for ParseError<L, T, E> where
    E: Ord,
    L: Ord,
    T: Ord
[src]

impl<L, T, E> Eq for ParseError<L, T, E> where
    E: Eq,
    L: Eq,
    T: Eq
[src]

impl<L, T, E> PartialEq<ParseError<L, T, E>> for ParseError<L, T, E> where
    E: PartialEq<E>,
    L: PartialEq<L>,
    T: PartialEq<T>, 
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<L, T, E> Debug for ParseError<L, T, E> where
    E: Debug,
    L: Debug,
    T: Debug
[src]

Formats the value using the given formatter.

impl<L, T, E> Clone for ParseError<L, T, E> where
    E: Clone,
    L: Clone,
    T: Clone
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more