diff --git a/src/repl.rs b/src/repl.rs index 3c7423f..d28614e 100644 --- a/src/repl.rs +++ b/src/repl.rs @@ -1,4 +1,4 @@ -use crate::{error::Error, syntax::parser::parse}; +use crate::{error::Error, interpreter::value::Value, syntax::parser::parse}; use rustyline::{error::ReadlineError, Editor}; pub fn repl() -> rustyline::Result<()> { @@ -7,7 +7,9 @@ pub fn repl() -> rustyline::Result<()> { loop { match rl.readline(prompt) { Ok(line) => match parse(&line) { - Ok(values) => values.iter().for_each(|e| println!("{e}")), + Ok(values) => values + .into_iter() + .for_each(|e| println!("{}", Into::::into(e))), Err(e) => e.into_iter().map(Error::Parse).for_each(|e| { if let Err(e) = e.report(&line) { eprintln!("Failed to generate error report\n{e:?}")