Enum hoodlum_parser::ParseError []

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

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

Fields

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

Custom error type.

Fields

Trait Implementations

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

Formats the value using the given formatter.