Liking cljdoc? Tell your friends :D

std.lang.base.emit-top-level


+emit-lookup+clj


emit-declareclj

(emit-declare key [tag & syms] grammar mopts)

emits declared

(emit-declare :def '(declare a b c) +grammar+ {}) => "def a,b,c"

emits declared 

(emit-declare :def
              '(declare a b c)
              +grammar+
              {})
=> "def a,b,c"
raw docstring

emit-defclj

(emit-def key [tag sym body :as form] grammar mopts)

creates the def string

creates the def string
raw docstring

emit-formclj

(emit-form key [sym & args :as form] {:keys [reserved] :as grammar} mopts)

creates a customisable emit and integrating both top-level and statements ^:hiddn

(emit-form :custom '(custom 1 2 3) (assoc-in +grammar+ [:reserved 'custom] {:emit (fn [_ _ _] 'CUSTOM)}) []) => 'CUSTOM

creates a customisable emit and integrating both top-level and statements
^:hiddn

(emit-form :custom
           '(custom 1 2 3)
           (assoc-in +grammar+
                     [:reserved 'custom]
                     {:emit  (fn [_ _ _]
                               'CUSTOM)})
          [])
=> 'CUSTOM
raw docstring

emit-top-levelclj

(emit-top-level key [tag sym & more :as form] grammar mopts)

generic define form

(binding [common/emit-fn common/emit-common] (emit-top-level :defn '(defn abc [a := 0] (+ 1 2 3)) +grammar+ {})) => "function abc(a = 0){\n 1 + 2 + 3;\n}"

generic define form

(binding [common/*emit-fn* common/emit-common]
  (emit-top-level :defn
                  '(defn abc [a := 0]
                     (+ 1 2 3))
                  +grammar+
                  {}))
=> "function abc(a = 0){\n  1 + 2 + 3;\n}"
raw docstring

transform-defclass-innerclj

(transform-defclass-inner body)

transforms the body to be fn.inner and var.inner

transforms the body to be fn.inner and var.inner
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close