Read Clojure source into rewrite-clj nodes, preserving everything the reader would discard (comments, whitespace, reader macros) so metrics can see the code as written.
Read Clojure source into rewrite-clj nodes, preserving everything the reader would discard (comments, whitespace, reader macros) so metrics can see the code as written.
(code-children node)The code children of node, or nil if node has no children. A reader conditional's children are its branch values, for every platform, so #?(:clj a :cljs b) has children a and b.
The code children of node, or nil if node has no children. A reader conditional's children are its branch values, for every platform, so #?(:clj a :cljs b) has children a and b.
(code-node? node)True if node is code rather than whitespace, a comment, or uneval (#_).
True if node is code rather than whitespace, a comment, or uneval (#_).
(head-symbol node)The unqualified name of the symbol at the head of a list node, or nil.
The unqualified name of the symbol at the head of a list node, or nil.
(ns-info forms)The ns form of a :forms node as a map of :ns (a symbol), :line, and :requires, a vector of {:ns lib :line n} for each library in its :require, :use, :require-macros, and :use-macros clauses, with :as and :as-alias (alias symbols) and :refer (a vector of symbols, including :refer-macros) when the libspec has them. A lib is a namespace symbol, or a string naming a JavaScript module in ClojureScript. Clauses and libspecs in reader conditionals count for every platform. Returns nil if there is no ns form.
The ns form of a :forms node as a map of :ns (a symbol), :line, and
:requires, a vector of {:ns lib :line n} for each library in its
:require, :use, :require-macros, and :use-macros clauses, with :as and
:as-alias (alias symbols) and :refer (a vector of symbols, including
:refer-macros) when the libspec has them. A lib is a namespace symbol,
or a string naming a JavaScript module in ClojureScript. Clauses and
libspecs in reader conditionals count for every platform. Returns nil
if there is no ns form.(parse-string s)Parse a string of Clojure source into a rewrite-clj :forms node. Nodes carry :row and :col metadata.
Parse a string of Clojure source into a rewrite-clj :forms node. Nodes carry :row and :col metadata.
(reader-conditional-node? node)True if node is a reader conditional, #? or #?@.
True if node is a reader conditional, #? or #?@.
(top-level-forms forms)The top-level code nodes of a :forms node.
The top-level code nodes of a :forms node.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |