From ecda5e2cffbcea90684e4636f16dd504cb7be83a Mon Sep 17 00:00:00 2001 From: Nathan Marz Date: Mon, 13 Jun 2016 19:49:35 -0400 Subject: [PATCH] rearrange code to hide riddley usage from bootstrap --- src/clj/com/rpl/specter/impl.cljx | 8 ++++++++ src/clj/com/rpl/specter/macros.clj | 5 ++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/clj/com/rpl/specter/impl.cljx b/src/clj/com/rpl/specter/impl.cljx index 4d21127..7815bcb 100644 --- a/src/clj/com/rpl/specter/impl.cljx +++ b/src/clj/com/rpl/specter/impl.cljx @@ -72,6 +72,14 @@ ; (macroexpand' x) ; x)) form)) +#+clj +(defn clj-macroexpand-all [form] + (riddley/macroexpand-all form)) + +#+cljs +(defn clj-macroexpand-all [form] + (throw-illegal "not implemented")) + #+clj (defn intern* [ns name val] (intern ns name val)) diff --git a/src/clj/com/rpl/specter/macros.clj b/src/clj/com/rpl/specter/macros.clj index 9fe52d3..7c45c6c 100644 --- a/src/clj/com/rpl/specter/macros.clj +++ b/src/clj/com/rpl/specter/macros.clj @@ -1,7 +1,6 @@ (ns com.rpl.specter.macros (:require [com.rpl.specter.impl :as i] - [clojure.walk :as cljwalk] - [riddley.walk :as riddley]) + [clojure.walk :as cljwalk]) ) (defn ^:no-doc gensyms [amt] @@ -496,7 +495,7 @@ ;; &env is preserved in any potential nested calls to select (like via ;; a view function) expanded (if (= platform :clj) - (riddley/macroexpand-all (vec path)) + (i/clj-macroexpand-all (vec path)) (cljs-macroexpand-all &env (vec path))) prepared-path (ic-prepare-path local-syms expanded)