cljc
This commit is contained in:
parent
8d35ea95f2
commit
500f104c1a
1 changed files with 17 additions and 0 deletions
17
src/scittle/makros.cljc
Normal file
17
src/scittle/makros.cljc
Normal 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)))
|
||||
Loading…
Add table
Add a link
Reference in a new issue