This commit is contained in:
2023-04-10 18:46:46 -07:00
parent 7c86ba070f
commit fbc0a6557e
6 changed files with 150 additions and 151 deletions

View File

@@ -1,6 +1,5 @@
// Many of these have been borrowed from insect.
use crate::parser;
use crate::evaluate;
fn eval_to_str(s: &str) -> Result<String, ()> {
let g = match parser::parse(&String::from(s)) {
@@ -9,7 +8,7 @@ fn eval_to_str(s: &str) -> Result<String, ()> {
};
//let out_str = g.print();
return match evaluate::evaluate(g) {
return match g.evaluate() {
Ok(x) => Ok(x.to_string_outer()),
Err(_) => Err(())
};