diff options
| author | Joel Martin <github@martintribe.org> | 2014-10-25 12:41:24 -0500 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2015-01-06 21:58:57 -0600 |
| commit | 0ab374bc261f871ab8fbbc13e0096f44225e2a3f (patch) | |
| tree | 18bf694e55ee767e5d55edf73819affa3f0214b5 /rust/src/step1_read_print.rs | |
| parent | abdd56ebc0e01cd92f694ef2bcafcc394453d055 (diff) | |
| download | mal-0ab374bc261f871ab8fbbc13e0096f44225e2a3f.tar.gz mal-0ab374bc261f871ab8fbbc13e0096f44225e2a3f.zip | |
rust: add step2_eval.
Diffstat (limited to 'rust/src/step1_read_print.rs')
| -rw-r--r-- | rust/src/step1_read_print.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/rust/src/step1_read_print.rs b/rust/src/step1_read_print.rs index c6f87d0..bc4827d 100644 --- a/rust/src/step1_read_print.rs +++ b/rust/src/step1_read_print.rs @@ -4,20 +4,19 @@ extern crate regex_macros; extern crate regex; -use std::rc::Rc; -use types::{MalVal,List,Vector,Int,Nil}; +use types::{MalVal,MalRet}; mod readline; mod types; mod reader; mod printer; // read -fn read(str: String) -> Result<MalVal,String> { +fn read(str: String) -> MalRet { reader::read_str(str) } // eval -fn eval(ast: MalVal) -> Result<MalVal,String> { +fn eval(ast: MalVal) -> MalRet { Ok(ast) } |
