(ast-zip root)Returns a zipper for nested vectors, given a root vector/seq. This is more forgiving than clojure.zip/vector-zip and accepts seqs or vectors as branches. We need this (for our second pass, the one on the AST) b/c our incoming templates are vector trees, but instaparse returns seqs.
Returns a zipper for nested vectors, given a root vector/seq. This is more forgiving than clojure.zip/vector-zip and accepts seqs or vectors as branches. We need this (for our second pass, the one on the AST) b/c our incoming templates are vector trees, but instaparse returns seqs.
(eval-error? x)(evaluate extensions context-map level-stack x)(extend-size target-count default-value coll)Extend collection to be at least target-count in length. Extra values concatenated
on the end will have value default-value.
Extend collection to be at least `target-count` in length. Extra values concatenated on the end will have value `default-value`.
(filter-ast x)(inc-last indexes)(inline-f-err-handler node level-stack thunk)(mk-handled & {:as m})(new-render-state context-map)(rc-error node fmt-msg & format-args)(render-ast context-map extensions ast)(rewind-to-bookmark zipper bookmark)(row->items loop-depth row)Pull value from the collector of each cell-seq item, based on the indices. If the cell value is a literal just use the value as is.
Pull value from the collector of each cell-seq item, based on the indices. If the cell value is a literal just use the value as is.
(set-bookmark loc bookmark)(single-or-reduce-str coll)(str-join-collectors loop-depth collectors)Within each cell, combine (str join) the collector values at each set of loop indices. Example: loop-depth = 2 collectors = [ [ [10 20] [10 20] [10 20]] ; (a) ['[a a] '[b b] '[c c]] ] ; (b) => [ ["10a" "20a"] ["10b" "20b"] ["10c" "20c"] ] This is:
Within each cell, combine (str join) the collector values at each set of loop indices.
Example:
loop-depth = 2
collectors =
[ [ [10 20] [10 20] [10 20]] ; (a)
['[a a] '[b b] '[c c]] ] ; (b)
=>
[ ["10a" "20a"]
["10b" "20b"]
["10c" "20c"] ]
This is:
1. Two Nodes in each cell, (a) and (b)
2. Outer loop length 3
3. Inner loop length 2(tagname tag-key)(template-err msg state-stack loc)(unroll rows)(unroll* loop-depth [row & remaining])(validate-state-level! state level-stack expected-start-tag node)(vec-append-at coll loop-indices value context-string)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 |