use std::fmt::Display;
#[derive(Clone, Debug)]
pub enum Error {
Parser(raffia::error::Error, usize, usize),
}
impl Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::Parser(error, line, col) => {
write!(f, "syntax error at line {line}, col {col}: {}", error.kind)
}
}
}
}
impl std::error::Error for Error {}