Skip to content

Commit

Permalink
still prettier messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mikebenfield committed Nov 22, 2024
1 parent 64c995b commit bc314c3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions interpreter/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ pub fn interpret(
let mut history = dialoguer::BasicHistory::new();
loop {
if let Some(v) = interpreter.view_current_in_context() {
println!("{v}");
println!("{}:\n{v}", "Prepared to evaluate".bold());
} else if let Some(v) = interpreter.view_current() {
println!("{v}");
println!("{}:\n{v}", "Prepared to evaluate".bold());
}
for (i, future) in interpreter.cursor.futures.iter().enumerate() {
println!("{i}: {future}");
Expand Down Expand Up @@ -259,7 +259,9 @@ pub fn interpret(
};

match interpreter.action(action) {
Ok(Some(value)) => println!("result: {value}"),
Ok(Some(value)) => {
println!("{}: {}\n", "Result".bold(), format!("{value}").bright_cyan());
}
Ok(None) => {}
Err(LeoError::InterpreterHalt(interpreter_halt)) => println!("Halted: {interpreter_halt}"),
Err(e) => return Err(e),
Expand Down

0 comments on commit bc314c3

Please sign in to comment.