pub type ParseError<'input> = ParseError<usize, Token<'input>, &'static str>;
Aliased Type§
pub enum ParseError<'input> {
InvalidToken {
location: usize,
},
UnrecognizedEof {
location: usize,
expected: Vec<String>,
},
UnrecognizedToken {
token: (usize, Token<'input>, usize),
expected: Vec<String>,
},
ExtraToken {
token: (usize, Token<'input>, usize),
},
User {
error: &'static str,
},
}
Variants§
InvalidToken
Generated by the internal lexer when it encounters a token (or EOF) it did not expect.
UnrecognizedEof
Generated by the parser when it encounters an EOF it did not expect.
Fields
UnrecognizedToken
Generated by the parser when it encounters a token it did not expect.
This means that the next token in the stream was not valid at this point in the grammar.
Fields
ExtraToken
Generated by the parser when it encounters additional, unexpected tokens.
Fields
User
Custom error type.