diff options
| author | Joel Martin <github@martintribe.org> | 2015-02-16 01:15:35 -0600 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2015-02-24 09:17:45 -0600 |
| commit | ad28cf3cb19d91399c52149d798f6c6efb780a51 (patch) | |
| tree | c92e35586cc92dc146868482701c39393895a649 /miniMAL/reader.json | |
| parent | 320455465294f170f54cda772142f4de4cb6f602 (diff) | |
| download | mal-ad28cf3cb19d91399c52149d798f6c6efb780a51.tar.gz mal-ad28cf3cb19d91399c52149d798f6c6efb780a51.zip | |
miniMAL: add metadata support.
Diffstat (limited to 'miniMAL/reader.json')
| -rw-r--r-- | miniMAL/reader.json | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/miniMAL/reader.json b/miniMAL/reader.json index e9ea6e1..5fa113b 100644 --- a/miniMAL/reader.json +++ b/miniMAL/reader.json @@ -88,6 +88,15 @@ ["do", ["rdr-next", "rdr"], ["list", ["symbol", ["`", "splice-unquote"]], ["read-form", "rdr"]]], + ["if", ["=", ["`", "^"], "token"], + ["do", + ["rdr-next", "rdr"], + ["let", ["meta", ["read-form", "rdr"]], + ["list", ["symbol", ["`", "with-meta"]], ["read-form", "rdr"], "meta"]]], + ["if", ["=", ["`", "@"], "token"], + ["do", + ["rdr-next", "rdr"], + ["list", ["symbol", ["`", "deref"]], ["read-form", "rdr"]]], ["if", ["=", ["`", ")"], "token"], ["throw", ["`", "unexpected ')'"]], @@ -104,7 +113,7 @@ ["if", ["=", ["`", "{"], "token"], ["apply", "hash-map", ["read-list", "rdr", ["`", "{"], ["`", "}"]]], - ["read-atom", "rdr"]]]]]]]]]]]]]], + ["read-atom", "rdr"]]]]]]]]]]]]]]]], ["def", "read-str", ["fn", ["strn"], ["let", ["tokens", ["tokenize", "strn"], |
