Skip to content

Commit

Permalink
[nop] Remove unused Cljs macros
Browse files Browse the repository at this point in the history
  • Loading branch information
ptaoussanis committed Jul 31, 2023
1 parent a64b81c commit 533dd0b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
26 changes: 14 additions & 12 deletions src/taoensso/tempura.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
(def ^:dynamic *tr-opts* nil)
(def ^:dynamic *tr-scope* nil)

(defmacro with-tr-opts [opts & body] `(binding [*tr-opts* ~opts] ~@body))
(defmacro with-tr-scope
"`(with-tr-scope :foo.bar (tr _ _ [:baz]))` is equivalent to
`(tr _ _ [:foo.bar/baz])`"
[scope & body]
`(binding [*tr-scope* ~scope] ~@body))
#?(:clj (defmacro with-tr-opts [opts & body] `(binding [*tr-opts* ~opts] ~@body)))
#?(:clj
(defmacro with-tr-scope
"`(with-tr-scope :foo.bar (tr _ _ [:baz]))` is equivalent to
`(tr _ _ [:foo.bar/baz])`"
[scope & body]
`(binding [*tr-scope* ~scope] ~@body)))

;;;;

Expand Down Expand Up @@ -159,14 +160,15 @@

[rname] (impl/load-resource rname)))

(defmacro load-resource-at-compile-time
"Experimental, subject to change.
Reads and inlines an edn resource on classpath, at compile-time.
Supported by: both clj and cljs.
#?(:clj
(defmacro load-resource-at-compile-time
"Experimental, subject to change.
Reads and inlines an edn resource on classpath, at compile-time.
Supported by: both clj and cljs.
See also `load-resource-at-runtime`."
See also `load-resource-at-runtime`."

[rname] (impl/load-resource rname))
[rname] (impl/load-resource rname)))

(comment (load-resource-at-compile-time "foo.edn"))

Expand Down
18 changes: 9 additions & 9 deletions src/taoensso/tempura/impl.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -444,14 +444,14 @@
acc resids))
nil locale-splits))

#_
(defmacro vargs "Experimental. Compile-time `impl/vargs`."
[x]
(if (map? x)
(do
(assert (enc/revery? enc/pos-int? (keys x))
"All arg map keys must be +ive non-zero ints")
(impl/vargs x))
(have vector? x)))
;; #?(:clj
;; (defmacro vargs "Experimental. Compile-time `impl/vargs`."
;; [x]
;; (if (map? x)
;; (do
;; (assert (enc/revery? enc/pos-int? (keys x))
;; "All arg map keys must be +ive non-zero ints")
;; (impl/vargs x))
;; (have vector? x))))

#_(comment (macroexpand '(vargs {1 (do "1") 2 (do "2")})))

0 comments on commit 533dd0b

Please sign in to comment.