switched to lrpar parser generator
This commit is contained in:
19
src/errors.rs
Normal file
19
src/errors.rs
Normal file
@@ -0,0 +1,19 @@
|
||||
use std::error::Error;
|
||||
use std::fmt::{Debug, Display, Formatter, Pointer};
|
||||
|
||||
pub struct CLIArgumentError(pub &'static str);
|
||||
|
||||
|
||||
impl Display for CLIArgumentError {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
f.write_str(self.0)
|
||||
}
|
||||
}
|
||||
|
||||
impl Debug for CLIArgumentError {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{}", self.0)
|
||||
}
|
||||
}
|
||||
|
||||
impl Error for CLIArgumentError {}
|
||||
Reference in New Issue
Block a user