Functions to transform parse trees
Functions to transform parse trees
(merge-meta obj metamap)This variation of the merge-meta in gll does nothing if obj is not something that can have a metamap attached.
This variation of the merge-meta in gll does nothing if obj is not something that can have a metamap attached.
(transform transform-map parse-tree)Takes a transform map and a parse tree (or seq of parse-trees). A transform map is a mapping from tags to functions that take a node's contents and return a replacement for the node, i.e., {:node-tag (fn [child1 child2 ...] node-replacement), :another-node-tag (fn [child1 child2 ...] node-replacement)}
Takes a transform map and a parse tree (or seq of parse-trees).
A transform map is a mapping from tags to
functions that take a node's contents and return
a replacement for the node, i.e.,
{:node-tag (fn [child1 child2 ...] node-replacement),
:another-node-tag (fn [child1 child2 ...] node-replacement)}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 |