mirror of
https://github.com/teo3300/rust-mal.git
synced 2026-01-12 17:25:33 +01:00
Preparing to implement multiple environments
Signed-off-by: teo3300 <matteo.rogora@live.it>
This commit is contained in:
@ -4,8 +4,8 @@
|
||||
// input, thus this can be referenced by the previous step without the need
|
||||
// to allocate more memory
|
||||
|
||||
use crate::envs::Env;
|
||||
use crate::mal_core::eval;
|
||||
use crate::env::Env;
|
||||
use crate::eval::eval;
|
||||
use crate::printer::pr_str;
|
||||
use crate::reader::read_str;
|
||||
use crate::types::{MalRet, MalType};
|
||||
@ -22,7 +22,7 @@ fn READ(input: &str) -> MalRet {
|
||||
#[allow(non_snake_case)]
|
||||
/// Evaluate the generated ast
|
||||
fn EVAL(ast: MalType, env: &Env) -> MalRet {
|
||||
match eval(ast, env) {
|
||||
match eval(&ast, env) {
|
||||
Ok(ast) => Ok(ast),
|
||||
Err(err) => Err(format!("@ EVAL: {}", err)),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user