Type Alias edlang_parser::error::Error
source · pub type Error = ParseError<usize, Token, LexicalError>;
Aliased Type§
enum Error {
InvalidToken {
location: usize,
},
UnrecognizedEof {
location: usize,
expected: Vec<String>,
},
UnrecognizedToken {
token: (usize, Token, usize),
expected: Vec<String>,
},
ExtraToken {
token: (usize, Token, usize),
},
User {
error: LexicalError,
},
}
Variants§
InvalidToken
Generated by the parser when it encounters a token (or EOF) it did not expect.
UnrecognizedEof
Fields
Generated by the parser when it encounters an EOF it did not expect.
UnrecognizedToken
Fields
Generated by the parser when it encounters a token it did not expect.
ExtraToken
Generated by the parser when it encounters additional, unexpected tokens.
User
Fields
§
error: LexicalError
Custom error type.