Releases: clj-commons/rewrite-clj
Release list
Clojars Release 0.3.10
Bugfixes
- fixes behaviour of
end?andnext.
Features
- adds
:row/:colto node metadata.
Artifact Coordinates
[rewrite-clj "0.3.10"]Clojars Release 0.3.9
Bugfixes
- access to children of quoted forms wasn't possible. (see #6)
rewrite-clj.zip/nextwhile at an empty vector moved to the non-existent first child of the vector. (see #5)rewrite-clj.zip/nextshould return itself if no next element available.
Features
rewrite-clj.zip/end?to decide whether the zipper has reached the last non-whitespace node.
Coordinates
[rewrite-clj "0.3.9"]Clojars Release 0.3.8
This release adds handling of the "do not evaluate" reader macro #_. The nodes have the :uneval node type.
[rewrite-clj "0.3.8"]Clojars Release 0.3.6
This release upgrades rewrite-clj's dependencies and fixes issues with parsing files containing UTF-8 characters (see xsc/lein-ancient#24).
Clojars Release 0.3.5
This release cleans up the dependency chain and upgrades org.clojure/tools.reader.
Clojars Release 0.3.4
This release updates rewrite-clj's dependencies, most importantly tools.reader. The combinations \return \newline and \return \formfeed are now read as a single newline character.
Clojars Release 0.3.3
This release fixes the handling of keywords. :abc, :1.5, :1.5.0, ::abc, ::1.5.0 are now processed correctly by the parser.
Clojars Release 0.3.2
This partially fixes the handling of keywords whose name isn't a symbol, e.g. :1.5.
Note: :1.5.1 still throws an exception. Sorry.
Clojars Release 0.3.1
The parse now handles implicitly namespaced keywords by creating a settings map in the :token node:
(parse-string ":x") ;; => [:token :x]
(parse-string "::x") ;; => [:token :x {:namespaced? true}]To use this version of rewrite-clj, add the following to the :dependencies vector in your project.clj:
[rewrite-clj "0.3.1"]Clojars Release 0.3.0
This release adds indentation-aware zipper operations (in rewrite-clj.zip.indent), requiring the addition of the new token type :newline, as well as having the zipper root node be of type :forms. This means that projects relying on the old structure have to be revisited!
Indentation can now be propagated through branches spanning multiple lines:
(require '[rewrite-clj.zip :as z] '[rewrite-clj.zip.indent :as i])
(def code
(z/of-string "
{:dependencies [[a \"1.0.0\"]
[b \"0.1.1\"]
[c \"1.2.3\"]]}"))
(-> code
(z/find-value z/next :dependencies)
(z/replace :deps)
z/print-root)
; {:deps [[a "1.0.0"]
; [b "0.1.1"]
; [c "1.2.3"]]}
(-> code
(z/find-value z/next :dependencies)
(i/replace :deps) ;; !!!
z/print-root)
; {:deps [[a "1.0.0"]
; [b "0.1.1"]
; [c "1.2.3"]]}Additionally, removal now handles whitespaces appropriately and there are some new functions for zipper manipulation/analysis. Click here for a detailed list of changes.