      :cache-analysis true
      :source-map true})
 
-  )+  )

               (.append sb (char c))
               (recur sb (.read in)))))))

(defn jsc-eval
  "Evaluate a JavaScript string in the JSC REPL process."
  [repl-env js]
  (let [{:keys [in out]} @(:socket repl-env)]
    (write out js)
    (let [result (json/read-str
                   (read-response in) :key-fn keyword)]
      {:status (keyword (:status result))
       :value  (:value result)})))

(defn load-javascript
  "Load a Closure JavaScript file into the JSC REPL process."

(ns ambly.repl.jsc
  (:require [clojure.string :as string]
            [clojure.java.io :as io]
            [cljs.analyzer :as ana]
            [cljs.compiler :as comp]
            [cljs.repl :as repl]
