lexer: implement std::error:;Error for Error (whoops!)

This commit is contained in:
John 2024-02-28 05:00:39 -06:00
parent 3785045989
commit e01c71f9a7

View File

@ -515,6 +515,7 @@ pub mod error {
})* })*
} }
} }
impl std::error::Error for Error {}
impl Display for Error { impl Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}:{}: {}", self.line, self.col, self.reason) write!(f, "{}:{}: {}", self.line, self.col, self.reason)