pub mod colors; #[derive(Debug)] pub enum RushError { SyntaxError(String), RuntimeError(String), VariableError(String), } impl std::fmt::Display for RushError { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { RushError::SyntaxError(msg) => write!(f, "{}", msg), RushError::RuntimeError(msg) => write!(f, "{}", msg), RushError::VariableError(msg) => write!(f, "{}", msg), } } } impl std::error::Error for RushError {}