This commit is contained in:
kloimhardt 2021-06-01 15:08:52 +02:00
parent 8d35ea95f2
commit 500f104c1a

17
src/scittle/makros.cljc Normal file
View file

@ -0,0 +1,17 @@
(ns scittle.makros)
#?(:cljs ;only cljs!!
(defn make-string [& vs]
(apply str "_cljs!_ " vs)))
#?(:clj
(defmacro add-slash-makro [x y]
`(#'make-string "/ form: " ~(str &form) " env: " ~(str (:name (:ns &env))) " params: " ~x ~y)))
;; needs to be both clj and cljs
(defn add-c-fn [form env x y]
`(#'make-string "c_form: " ~(str form) " c_env: " ~(str (:name (:ns env))) " parms " ~x ~y))
#?(:clj
(defmacro add-c-makro [x y]
(add-c-fn &form &env x y)))