Added environment with basic math functions

Signed-off-by: teo3300 <matteo.rogora@live.it>
This commit is contained in:
teo3300
2023-06-11 03:03:25 +02:00
parent fe6fbf061c
commit d03f43a94c
7 changed files with 76 additions and 55 deletions

View File

@ -36,6 +36,7 @@ fn PRINT(output: MalType) -> String {
pub fn rep(input: &str, env: &Env) -> Result<String, String> {
let ast = READ(input)?;
// println!("{:#?}", ast);
let out = EVAL(ast, env)?;
Ok(PRINT(out))
}