Skip to content

Clojars Release 0.4.0

Compare
Choose a tag to compare
@xsc xsc released this 13 Jan 11:07
· 825 commits to main since this release

Breaking Changes

  • this release introduces a type/protocol based node structure, meaning that the parser no longer produces nested vectors.
  • the namespace rewrite-clj.zip.indent (whilst never part of any public API) is no longer usable.
  • node creation/edit has stronger preconditions (for example, exactly two non-whitespace forms are now required in
    meta nodes).

These changes mean that direct manipulation of tree nodes is no longer possible, as well as that the order of certain edit operations has to be adjusted (e.g. to splice a reader macro form without the macro part you now have to first splice, then remove; before, you could first remove, then splice because the :reader-macro node did not care about its contents).

Features

  • adds rewrite-clj.node/child-sexprs.
  • adds node constructor functions.
  • edit/replace allow for pre-constructed nodes to be inserted.

Bugfixes

  • certain forms now allow for spaces between prefix and value, e.g. #' x equals #'x. (see #7)
  • radix support is now working, i.e. 0x1 no longer gets replaced by 1. (see #13)

Artifact Coordinates

[rewrite-clj "0.4.0"]