diff options
Diffstat (limited to 'src/boot.clj')
-rw-r--r-- | src/boot.clj | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/boot.clj b/src/boot.clj index 0aed40cd..8fe4ae57 100644 --- a/src/boot.clj +++ b/src/boot.clj @@ -839,6 +839,19 @@ (encl-fn (map rest collseq)))))) (cons coll colls))))) +(defn macroexpand-1 [form] + (let [v (. clojure.lang.Compiler (isMacro (first form)))] + (if v + (apply @v (rest form)) + form))) + +(defn macroexpand [form] + (let [ex (macroexpand-1 form) + v (. clojure.lang.Compiler (isMacro (first ex)))] + (if v + (macroexpand ex) + ex))) + (def *exports* '(clojure load-file eql-ref? @@ -879,5 +892,6 @@ int long float double short byte boolean char aget aset aset-boolean aset-int aset-long aset-float aset-double aset-short aset-byte make-array + macroexpand-1 macroexpand )) |