added interactive inputs, better error messages, bugfixes
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
pub mod colors;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum RushError {
|
||||
SyntaxError(String),
|
||||
@@ -7,7 +9,11 @@ pub enum RushError {
|
||||
|
||||
impl std::fmt::Display for RushError {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{:?}", self)
|
||||
match self {
|
||||
RushError::SyntaxError(msg) => write!(f, "{}", msg),
|
||||
RushError::RuntimeError(msg) => write!(f, "{}", msg),
|
||||
RushError::VariableError(msg) => write!(f, "{}", msg),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user