added interactive inputs, better error messages, bugfixes

This commit is contained in:
2025-11-03 20:55:45 +01:00
parent 2336ce0325
commit d289cff56c
17 changed files with 955 additions and 55 deletions

View File

@@ -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),
}
}
}