                syntax-items
                [destructure-item])))))
 
-(defmethod parse-ns "cljs.test" [ns-]
+(defmethod parse-ns ["cljs.test" :library] [ns- api]
   (parse-ns* ns- "clojurescript"
     (cond
       (>  *cljs-num* 3269) [:library]
-      (>= *cljs-num* 0)    [:library :compiler]
+      (>= *cljs-num* 0)    [:library :compiler] ;; macros mistakenly kept in compiler section before 3269
       :else nil)))
 
-(defmethod parse-ns "cljs.repl" [ns-]
+(defmethod parse-ns ["cljs.repl" :library] [ns- api]
   ;; the library file "repl.cljs" has (:require-macros cljs.repl)
   ;; so we must pull those in from the compiler and add in the
   ;; library functions.
-  (let [comp-syms (cond->> (parse-ns* ns- "clojurescript" [:compiler])
-
-                 ;; if parsing for library API, the macros are the only symbols we can use.
-                 (= "library" *cur-api*) (filter #(= "macro" (:type %))))
-
-        lib-syms (when (= "library" *cur-api*)
-                   (parse-ns* ns- "clojurescript" [:library]))]
-    (concat comp-syms lib-syms)))
-
-(defmethod parse-ns :default-lib [ns-]
+  (let [macros (->> (parse-ns* ns- "clojurescript" [:compiler])
+                    (filter #(= "macro" (:type %))))
+        lib (parse-ns* ns- "clojurescript" [:library])]
+    (concat macros lib)))
+
+(defmethod parse-ns ["cljs.repl.nashorn" :compiler] [ns- api]
+  (cond
+    (>= *cljs-num* 3255) nil ;; FIXME: parse defs from 
+    ;; (util/compile-if (Class/forName "jdk.nashorn.api.scripting.NashornException")
+    ;;   (do ... ))
+    (>= *cljs-num* 0) (parse-ns* ns- "clojurescript" :compiler)))
+
+(defmethod parse-ns [:default :library] [ns- api]
   (parse-ns* ns- "clojurescript" :library))
 
-(defmethod parse-ns :default-compiler [ns-]
+(defmethod parse-ns [:default :compiler] [ns- api]
   (parse-ns* ns- "clojurescript" :compiler))
 
 ;;------------------------------------------------------------

    specials))

;; pseudo-namespace since repl special forms don't have a namespace
(defmethod parse-ns "specialrepl" [ns-]
  (let [forms (apply concat (read-ns-forms "cljs.repl" :compiler))
        docs (first (keep parse-repl-special-docs forms))
        specials (binding [*cur-ns* ns-

;;------------------------------------------------------------

(defmulti parse-ns
  (fn [ns- api]
    (if (= :custom (get-in namespaces [api ns-]))
      [ns- api]
      [:default api])))

(defmethod parse-ns ["cljs.core" :library] [ns- api]
  ;; NOTE: Concatenation order is important here
  ;; so previously defined macros/functions are overwritten
  ;; by subsequent ones.
