Rewrite-cljs Api Documentation

Version: 0.3.0

rewrite-clj.zip.findz

find

(find zloc p?)(find zloc f p?)

Find node satisfying the given predicate by repeatedly applying the given movement function to the initial zipper location.

find-depth-first

(find-depth-first zloc p?)

Find node satisfying the given predicate by traversing the zipper in a depth-first way.

find-last-by-pos

(find-last-by-pos zloc pos)(find-last-by-pos zloc pos p?)

Find last node (if more than one node) that is in range of pos and satisfying the given predicate depth first from initial zipper location.

find-next

(find-next zloc p?)(find-next zloc f p?)

Find node other than the current zipper location matching the given predicate by applying the given movement function to the initial zipper location.

find-next-depth-first

(find-next-depth-first zloc p?)

Find node other than the current zipper location matching the given predicate by traversing the zipper in a depth-first way.

find-next-tag

(find-next-tag zloc t)(find-next-tag zloc f t)

Find node other than the current zipper location with the given tag by repeatedly applying the given movement function to the initial zipper location.

find-next-token

(find-next-token zloc p?)(find-next-token zloc f p?)

Find next token node matching the given predicate by applying the given movement function to the initial zipper location, defaulting to right.

find-next-value

(find-next-value zloc v)(find-next-value zloc f v)

Find next token node whose value matches the given one by applying the given movement function to the initial zipper location, defaulting to right.

find-tag

(find-tag zloc t)(find-tag zloc f t)

Find node with the given tag by repeatedly applying the given movement function to the initial zipper location.

find-tag-by-pos

(find-tag-by-pos zloc pos t)

Find node with the given tag and pos depth-first from initial zipper location.

find-token

(find-token zloc p?)(find-token zloc f p?)

Find token node matching the given predicate by applying the given movement function to the initial zipper location, defaulting to right.

find-value

(find-value zloc v)(find-value zloc f v)

Find token node whose value matches the given one by applying the given movement function to the initial zipper location, defaulting to right.

in-range?

(in-range? {:keys [row col end-row end-col]} {r :row, c :col})

tag-predicate

(tag-predicate t & [additional])