You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this is a bug or a behavior to document, just recording some notes for now.
Version
Pre-existing in v0
Platform
All
Behaviour
Let's explore what happens with next (whitespace aware) vs next* (raw) in rewrite-clj.
These tests were carried out on v0.6.1 just to make sure this behaviour was not something v1 code introduced.
-- Variation 1 next on underlying clojure.zip zipper
stays on the last node when end is hit, zipper is still traversable:
-- Variation 3 next on underlying "custom zipper"
rewrite-clj's zipper that supports position tracking, behaviour is same as next on underlying clojure.zip zipper.
-- Variation 4 next* on underlying position tracking zipper
behaviour is same as next* on underlying clojure.zip zipper, we end up at root node and zipper is no longer traversable:
So at least we are consistent for next* and next for custom and clojure zipper.
-- Variation 5 - Sanity check on clojure.zip zipper
And just a quick check on using a clojure.zip zipper outside of rewrite-clj (yeah, same behaviour as next* in rewrite-clj):
Not sure if this is a bug or a behavior to document, just recording some notes for now.
Version
Pre-existing in v0
Platform
All
Behaviour
Let's explore what happens with
next
(whitespace aware) vsnext*
(raw) in rewrite-clj.These tests were carried out on v0.6.1 just to make sure this behaviour was not something v1 code introduced.
-- Variation 1
next
on underlyingclojure.zip
zipperstays on the last node when end is hit, zipper is still traversable:
-- Variation 2
next*
on underlyingclojure.zip
zipperhits an end state, node becomes root node, zipper is no longer traversable:
-- Variation 3
next
on underlying "custom zipper"rewrite-clj's zipper that supports position tracking, behaviour is same as
next
on underlyingclojure.zip
zipper.-- Variation 4
next*
on underlying position tracking zipperbehaviour is same as
next*
on underlyingclojure.zip
zipper, we end up at root node and zipper is no longer traversable:So at least we are consistent for
next*
andnext
for custom and clojure zipper.-- Variation 5 - Sanity check on clojure.zip zipper
And just a quick check on using a
clojure.zip
zipper outside of rewrite-clj (yeah, same behaviour asnext*
in rewrite-clj):The text was updated successfully, but these errors were encountered: