use lalrpop_util::lalrpop_mod;
pub mod lexer;
lalrpop_mod!(#[allow(clippy::all)]pub parser, "/parser/parser.rs");
#[derive(Debug)]
pub struct ParserError {
pub message: String,
pub line: usize,
pub column: usize,
}
impl std::error::Error for ParserError {
fn description(&self) -> &str {
&self.message
}
}
impl std::fmt::Display for ParserError {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(
f,
"{} (line {}, column {})",
self.message, self.line, self.column
)
}
}