 
 (defn parse-defn-or-macro
   [form]
-  (let [docstring (let [ds (nth form 2)]
+  (let [fn-or-macro ({'defn "function" 'defmacro "macro"} (first form))
+        args (drop 2 form)
+        docstring (let [ds (first args)]
                     (when (string? ds)
                       ds))
-        attr-map (let [m (nth form (if docstring 3 2))]
+        args (if docstring (rest args) args)
+        attr-map (let [m (first args)]
                    (when (map? m) m))
+        args (if attr-map (rest args) args)
+        private? (:private attr-map)
         doc-forms (cond-> []
                     docstring (conj docstring)
                     attr-map (conj attr-map))
-        sig-body-forms (drop (+ 2 (count doc-forms)) form)
-        signatures (if (vector? (first sig-body-forms))
-                     (take 1 sig-body-forms)
-                     (map first sig-body-forms))
+        signatures (if (vector? (first args))
+                     (take 1 args)
+                     (map first args))
         expected-docs (try-locate-docs
                         {:whole form
                          :head (take 2 form)
                          :doc doc-forms
-                         :sig-body sig-body-forms})]
-    {:expected-docs expected-docs
-     :docstring (fix-docstring docstring)
-     :signatures signatures}))
+                         :sig-body args})]
+    (when-not private?
+      {:expected-docs expected-docs
+       :docstring (fix-docstring docstring)
+       :signatures signatures
+       :fn-or-macro fn-or-macro})))
 
 (defn parse-def-fn
   [form]

      (doall (keep #(parse-form % ns- repo) forms)))))

(defn get-imported-macro-api
  [ns- repo file macro-api]
  (let [forms (get-forms ns- repo file)
        macro-names (-> (filter #(= 'import-macros (first %)) forms)
                        first (nth 2) set)]
    (filter #(macro-names (:name %)) macro-api)))

;;------------------------------------------------------------
;; Namespace API parsing
;;------------------------------------------------------------

(defmulti parse-ns-api (fn [ns-] ns-))

(defmethod parse-ns-api "cljs.core" [ns-]
  (let [clj-api       (parse-api ns- "clojure"       "core.clj")
        clj-type-api  (parse-api ns- "clojure"       "core_deftype.clj")
        clj-cljs-api  (parse-api ns- "clojurescript" "core.clj")
        cljs-cljs-api (parse-api ns- "clojurescript" "core.cljs")
        import-macro-api (get-imported-macro-api ns- "clojurescript" "core.clj" (concat clj-api clj-type-api))]
    (concat import-macro-api
            clj-cljs-api
            cljs-cljs-api)))

(defmethod parse-ns-api "cljs.reader" [ns-]
  (parse-api ns- "clojurescript" "reader.cljs"))

        signatures (when-let [arglists (:arglists m)]
                     (when (= 'quote (first arglists))
                       (second arglists)))]
    {:docstring docstring
     :signatures signatures
     :fn-or-macro "function"}))

(defmulti parse-form*
  (fn [form]
