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.
The code children of node, or nil if node has no children.
(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 symbol :line n} for each namespace in its :require and :use clauses, with :as (an alias symbol) and :refer (a vector of symbols) when the libspec has them. 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 symbol :line n} for each namespace in its
:require and :use clauses, with :as (an alias symbol) and :refer (a
vector of symbols) when the libspec has them. 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.
(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 |