Common utility functions for using rewrite-clj zippers.
Common utility functions for using rewrite-clj zippers.
(comment? zloc)
True if the node at this location is a comment.
True if the node at this location is a comment.
(element? zloc)
True if the node at this location represents a syntactically important token.
True if the node at this location represents a syntactically important token.
(form-symbol zloc)
Return a name-only symbol for the leftmost node from this location.
Return a name-only symbol for the leftmost node from this location.
(form-symbol-full zloc)
Return the symbol in the leftmost node from this location.
Return the symbol in the leftmost node from this location.
(multiline? zloc)
True if the form at this location spans more than one line.
True if the form at this location spans more than one line.
(reader-conditional? zloc)
True if the node at this location is a reader conditional form.
True if the node at this location is a reader conditional form.
(reader-macro? zloc)
True if the node at this location is a reader macro expression.
True if the node at this location is a reader macro expression.
(root? zloc)
True if this location is the root node.
True if this location is the root node.
(skip-whitespace zloc)
Skip to the location of the next non-whitespace node.
Skip to the location of the next non-whitespace node.
(token-value zloc)
Return the s-expression form of the token at this location.
Return the s-expression form of the token at this location.
(token? zloc)
True if the node at this location is a token.
True if the node at this location is a token.
(top? zloc)
True if the node at this location has a parent node.
True if the node at this location has a parent node.
(whitespace? zloc)
True if the node at this location is whitespace and not a line break character.
True if the node at this location is whitespace and _not_ a line break character.
True if the node contains a line break.
True if the node contains a line break.
(zprn zloc tag)
Print a zipper location for debugging purposes. Returns the location unchanged.
Print a zipper location for debugging purposes. Returns the location unchanged.
True if the node is a whitespace node.
True if the node is a whitespace node.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close