From 648110a554a13e1caaf846a60c85cccadcda6e0d Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 3 Jan 2015 01:48:08 -0400 Subject: The language now supports macros. --- src/lang/util.clj | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/lang/util.clj') diff --git a/src/lang/util.clj b/src/lang/util.clj index e2edfb550..7eb431033 100644 --- a/src/lang/util.clj +++ b/src/lang/util.clj @@ -132,3 +132,28 @@ [::ok [(assoc state slot ?state) ?value]] _ =return)))) + +(defn ^:private normalize-char [char] + (case char + \* "_ASTER_" + \+ "_PLUS_" + \- "_DASH_" + \/ "_SLASH_" + \_ "_UNDERS_" + \% "_PERCENT_" + \$ "_DOLLAR_" + \! "_BANG_" + \' "_QUOTE_" + \` "_BQUOTE_" + \@ "_AT_" + \^ "_CARET_" + \& "_AMPERS_" + \= "_EQ_" + ;; default + char)) + +(defn normalize-ident [ident] + (reduce str "" (map normalize-char ident))) + +(defonce loader (doto (-> (java.io.File. "./") .toURL vector into-array java.net.URLClassLoader.) + (->> (prn 'loader)))) -- cgit v1.2.3