From 2f5d2320bd48583f1db60c2f7b298bed705b19e6 Mon Sep 17 00:00:00 2001 From: kloimhardt Date: Tue, 1 Jun 2021 11:43:01 +0200 Subject: [PATCH] macro works --- src/scittle/makro_plugin.cljs | 4 ++-- test.html | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/scittle/makro_plugin.cljs b/src/scittle/makro_plugin.cljs index da290ba..9be33e4 100644 --- a/src/scittle/makro_plugin.cljs +++ b/src/scittle/makro_plugin.cljs @@ -3,8 +3,8 @@ [sci.core :as sci] [scittle.core :as scittle])) -(defn add-low-fn [_env _form x y & zs] `(str "__" ~x ~y ~zs)) -(def add-low-makro (with-meta add-low-fn {:sci/macro true})) +(defn add-low-fn [_env _form x y] `(str "_" ~x ~y)) +(defn ^:macro add-low-makro [_env _form x y] (add-low-fn _env _form x y)) (def rns (sci/create-ns 'makro-plugin.core nil)) diff --git a/test.html b/test.html index 3180191..f306ddc 100644 --- a/test.html +++ b/test.html @@ -5,11 +5,8 @@