diff options
| author | Joel Martin <github@martintribe.org> | 2014-10-27 21:42:46 -0500 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2015-01-06 21:59:00 -0600 |
| commit | 06fef9b51830a2aa696f3e108c56f306967ce465 (patch) | |
| tree | d3568abe85505a7c825ad96ffabd44adc7b4d456 /rust/src/reader.rs | |
| parent | b12d98e4e3424be6b1e851c9450e9532910996ec (diff) | |
| download | mal-06fef9b51830a2aa696f3e108c56f306967ce465.tar.gz mal-06fef9b51830a2aa696f3e108c56f306967ce465.zip | |
rust: add atom support. Fix vector params.
Diffstat (limited to 'rust/src/reader.rs')
| -rw-r--r-- | rust/src/reader.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/rust/src/reader.rs b/rust/src/reader.rs index 652a7d7..e3ec55e 100644 --- a/rust/src/reader.rs +++ b/rust/src/reader.rs @@ -166,6 +166,13 @@ fn read_form(rdr : &mut Reader) -> MalRet { Err(e) => Err(e), } }, + "@" => { + let _ = rdr.next(); + match read_form(rdr) { + Ok(f) => Ok(list(vec![symbol("deref"), f])), + Err(e) => Err(e), + } + }, ")" => err_str("unexected ')'"), "(" => read_list(rdr), |
