use thiserror::Error;
#[derive(Error, Debug)]
pub enum ParseError {
#[error("lexing error at {0:?}")]
Lex(String),
#[error("unexpected end of input")]
Eoi,
#[error("unexpected token: expected {expected:?}, found {found:?}")]
Unexpected {
expected: &'static str,
found: Option<super::lexer::Token>,
},
#[error("invalid syntax: {0}")]
Syntax(String),
}