pub enum Error {
IO(Error),
UnexpectedToken {
path: Option<PathBuf>,
location: (usize, usize),
expect: Vec<TokenKind>,
actual: Option<Token>,
},
Else {
path: Option<PathBuf>,
location: (usize, usize),
reason: String,
},
}Expand description
indicates all possible errors during parsing
Variants§
IO(Error)
wrap system IO errors, usually an open error when opening the given path
UnexpectedToken
syntax error such as some token are not in the right position
Else
some other parser errors include scanner errors such as parsing numeric literal errors