Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added :doc entries for ns and def

  • Loading branch information...
commit bef56a74f2eeecabfe0c0a28d89b455dce576ea3 1 parent 69897cf
@franks42 franks42 authored David Nolen committed
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/clj/cljs/analyzer.clj
View
7 src/clj/cljs/analyzer.clj
@@ -331,8 +331,10 @@
(str "WARNING: " (symbol (str ns-name) (str sym))
" no longer fn, references are stale"))))
(swap! namespaces assoc-in [ns-name :defs sym]
- (merge {:name name}
+ (merge
+ {:name name}
sym-meta
+ (when doc {:doc doc})
(when dynamic {:dynamic true})
(when-let [line (:line env)]
{:file *cljs-file* :line line})
@@ -671,6 +673,7 @@
(clojure.core/require nsym))
(swap! namespaces #(-> %
(assoc-in [name :name] name)
+ (assoc-in [name :doc] docstring)
(assoc-in [name :excludes] excludes)
(assoc-in [name :uses] uses)
(assoc-in [name :requires] requires)
@@ -680,7 +683,7 @@
[alias (find-ns nsym)])
requires-macros)))
(assoc-in [name :imports] imports)))
- {:env env :op :ns :form form :name name :uses uses :requires requires :imports imports
+ {:env env :op :ns :form form :name name :doc docstring :uses uses :requires requires :imports imports
:uses-macros uses-macros :requires-macros requires-macros :excludes excludes}))
(defmethod parse 'deftype*
Please sign in to comment.
Something went wrong with that request. Please try again.