aboutsummaryrefslogtreecommitdiff
path: root/miniMAL/reader.json
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2015-02-15 20:46:19 -0600
committerJoel Martin <github@martintribe.org>2015-02-15 20:46:19 -0600
commit1981bf5766d9bb75a652cc781b817cc3150d12ef (patch)
treeb6663351e6290a05b048de1878ccd5a42db54333 /miniMAL/reader.json
parent9d8f02993276fe9b77f7c21099d1b9f1602d195c (diff)
downloadmal-1981bf5766d9bb75a652cc781b817cc3150d12ef.tar.gz
mal-1981bf5766d9bb75a652cc781b817cc3150d12ef.zip
miniMAL: step7
Diffstat (limited to 'miniMAL/reader.json')
-rw-r--r--miniMAL/reader.json19
1 files changed, 18 insertions, 1 deletions
diff --git a/miniMAL/reader.json b/miniMAL/reader.json
index 7058558..108d626 100644
--- a/miniMAL/reader.json
+++ b/miniMAL/reader.json
@@ -66,11 +66,28 @@
["def", "read-form", ["fn", ["rdr"],
["let", ["token", ["rdr-peek", "rdr"]],
+ ["if", ["=", ["`", "'"], "token"],
+ ["do",
+ ["rdr-next", "rdr"],
+ ["list", ["symbol", ["`", "quote"]], ["read-form", "rdr"]]],
+ ["if", ["=", ["`", "`"], "token"],
+ ["do",
+ ["rdr-next", "rdr"],
+ ["list", ["symbol", ["`", "quasiquote"]], ["read-form", "rdr"]]],
+ ["if", ["=", ["`", "~"], "token"],
+ ["do",
+ ["rdr-next", "rdr"],
+ ["list", ["symbol", ["`", "unquote"]], ["read-form", "rdr"]]],
+ ["if", ["=", ["`", "~@"], "token"],
+ ["do",
+ ["rdr-next", "rdr"],
+ ["list", ["symbol", ["`", "splice-unquote"]], ["read-form", "rdr"]]],
+
["if", ["=", ["`", ")"], "token"],
["throw", ["`", "unexpected ')'"]],
["if", ["=", ["`", "("], "token"],
["read-list", "rdr"],
- ["read-atom", "rdr"]]]]]],
+ ["read-atom", "rdr"]]]]]]]]]],
["def", "read-str", ["fn", ["strn"],
["let", ["tokens", ["tokenize", "strn"],