This commit is contained in:
1 parent
78f5f94adc
commit
738121c18a
2 files changed
+22
-3
No files matched your search
+10
-1
@@ -1,7 +1,8 @@
|
||||
(ns scm
|
||||
(:require [instaparse.core :as insta]
|
||||
[clojure.java.io :as io]
|
||||
[clojure.core.match :refer [match]])
|
||||
[clojure.core.match :refer [match]]
|
||||
[clojure.string :as str])
|
||||
(:refer-clojure :exclude [read]))
|
||||
|
||||
|
||||
@@ -60,6 +61,14 @@
|
||||
(match x
|
||||
(:or "#t" "#true") true
|
||||
(:or "#f" "#false") false)])
|
||||
:string (fn [& els]
|
||||
(apply str
|
||||
(for [e els]
|
||||
(match e
|
||||
"\\\\" "\\"
|
||||
"\\\"" "\""
|
||||
"\\n" "\n"
|
||||
_ e))))
|
||||
:sign (fn
|
||||
([] identity)
|
||||
([x] (match x "-" - "+" identity)))
|
||||
|
||||
Reference in new issue
Block a user