site.fabricate.prototype.document.clojure
Namespace
Prototype namespace for generating Hiccup and Kindly values from Clojure forms.
Functions
forms->hiccup- Description
- Produce a Hiccup article vector from the given forms after evaluation.
- Arguments
[{:keys [clojure/forms] page-ns :clojure/namespace :as page-map}]
eval-forms- Description
- Evaluate the Clojure forms in a parsed file.
- Arguments
[{:keys [clojure/forms] :as input}]
node->form- Description
- Convert the given rewrite-clj node into a form map.
- Arguments
[n m][n]
read-forms- Description
- Return a vector of Clojure form maps from the input file or string. If passed a file or string path pointing to an existing file, will read from the file, otherwise treats the input as a string containing Clojure source.
- Arguments
[clj-src]
normalize-node- Description
- Return a node representing the normalized 'value' for the given node.
- Arguments
[n]
eval-form- Description
- Evaluate the Clojure form contained in the given map.
- Arguments
[{clojure-form :clojure/form clj-ns :clojure/namespace clj-str :clojure/source :or {clj-ns (ns-name *ns*)} :as unevaluated-form}]
form->kind- Description
- Produce a kindly value from the given form. By default, produces a plaintext string from a Clojure comment form and marks it as a Clojure comment with metadata. Will wrap values not supporting metadata in vectors.
- Arguments
[{:keys [clojure/result clojure/metadata clojure/form clojure/source] clj-comment :clojure/comment clj-error :clojure/error :as evaluated-form} {:keys [hide-nils hide-vars] :or {hide-nils true hide-vars true} :as opts}][form]
forms->fragment- Description
- Produce a kindly fragment from the given forms. Consecutive comment forms get combined into a single plaintext string. Whitespace-only forms get skipped. See https://scicloj.github.io/kindly-noted/kinds.html#fragment for documentation about the fragment kind.
- Arguments
[{:keys [clojure/forms] page-ns :clojure/namespace :as page-map}]
Constants
form-schema- Description
- Map schema describing a simplified way of storing Clojure forms and their potential results.
- Type
:malli.core/schema