flux_syntax

Type Alias LalrpopError

Source
pub(crate) type LalrpopError = ParseError<Location, Token, UserParseError>;

Aliased Type§

enum LalrpopError {
    InvalidToken {
        location: Location,
    },
    UnrecognizedEof {
        location: Location,
        expected: Vec<String>,
    },
    UnrecognizedToken {
        token: (Location, Token, Location),
        expected: Vec<String>,
    },
    ExtraToken {
        token: (Location, Token, Location),
    },
    User {
        error: UserParseError,
    },
}

Variants§

§

InvalidToken

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

Fields

§location: Location
§

UnrecognizedEof

Generated by the parser when it encounters an EOF it did not expect.

Fields

§location: Location

The end of the final token

§expected: Vec<String>

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

§

UnrecognizedToken

Generated by the parser when it encounters a token it did not expect.

Fields

§token: (Location, Token, Location)

The unexpected token of type T with a span given by the two L values.

§expected: Vec<String>

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

§

ExtraToken

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

Fields

§

User

Custom error type.

Fields