 (defmethod -emit :in-ns [{:keys [name]}]
   (emit-module-declaration (clojure.core/name name)))
 
-(defn- wrap-emit-in-module-eval [emitter]
-  (fn [{:keys [op env] :as ast}]
-    (let [body (emitter ast)]
-      (if (= op :create-ns)
-        body
-        (module-eval (:ns env) body)))))
-
-(defn- wrap-emit-source-comment [emitter]
-  (fn [{:keys [form] :as ast}]
-    (format "# %s\n%s" form (emitter ast))))
-
-(def emitter (-> -emit
-               wrap-emit-source-comment))
-
 (defn emit [ast]
-  (emitter ast))
+  (-emit ast))


(defn- wrap-quotes [s]
  (format "\"%s\"" s))

(defn- endl-separate [exprs]
  (clojure.string/join "\n" exprs))

(defn- module-eval [ns body]
  (if (and ns (not= 'user ns) (not= "" body))
    (format "%s.module_eval do\n%s\nend"
            (namespace->module (name ns))
            body)
    body))

(defmulti -emit (fn [{:keys [op] :as ast}] op))


            [clojure.tools.analyzer.utils :refer [resolve-var]]
            [clojure.ruby.runtime         :refer [var->constant lookup-var-in-module]]
            [clojure.ruby.util            :refer :all]))

(defn- endl-separate [exprs]
  (clojure.string/join "\n" exprs))

(defn- indent [s]
  (endl-separate
    (map
      #(str "  " %)
      (clojure.string/split s #"\n"))))

(defn- comma-separate [exprs]
  (clojure.string/join ", " exprs))
