new Runtime object

This commit is contained in:
2024-10-15 00:47:20 -04:00
parent e0e33c868b
commit f9f5cb40e9
3 changed files with 35 additions and 5 deletions

View File

@@ -326,7 +326,7 @@ where
ParseTree::StringCast(x) => Ok(Value::String(format!("{}", self.exec(x, locals)?))),
ParseTree::Print(x) => match self.exec(x, locals)? {
x => {
writeln!(self.stdout, "{x}").map_err(|e| RuntimeError::IO(e));
writeln!(self.stdout, "{x}").map_err(|e| RuntimeError::IO(e))?;
Ok(Value::Nil)
}
}