Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Stephen Rudolph 2016-02-26 16:29:34 -06:00
commit 0f2118d939
4 changed files with 11 additions and 10 deletions

View file

@ -3,6 +3,7 @@
* declarepath can now be parameterized
* Added params-reset which calls its path with the params index walked back by the number of params needed by its path. This enables recursive parameterized paths
* Added convenience syntax for defprotocolpath with no params, e.g. (defprotocolpath foo)
* Rename VOID to STOP
## 0.9.2
* Added VOID selector which navigates nowhere

View file

@ -1,16 +1,16 @@
(def VERSION (.trim (slurp "VERSION")))
(defproject com.rpl/specter VERSION
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-3211"]
]
:jvm-opts ["-XX:-OmitStackTraceInFastThrow"] ; this prevents JVM from doing optimizations which can remove stack traces from NPE and other exceptions
:source-paths ["src/clj"]
:java-source-paths ["src/java"]
:test-paths ["test", "target/test-classes"]
:jar-exclusions [#"\.cljx"]
:auto-clean false
:profiles {:dev {:dependencies
:profiles {:provided {:dependencies
[[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-3211"]]}
:dev {:dependencies
[[org.clojure/test.check "0.7.0"]]
:plugins
[[com.keminglabs/cljx "0.6.0"]]

View file

@ -150,7 +150,7 @@
(defpath
^{:doc "Stops navigation at this point. For selection returns nothing and for
transformation returns the structure unchanged"}
VOID
STOP
[]
(select* [this structure next-fn]
nil )

View file

@ -574,11 +574,11 @@
(for-all+
[s1 (gen/vector (limit-size 5 gen/int))]
(and
(empty? (s/select s/VOID s1))
(empty? (s/select [s/VOID s/ALL s/ALL s/ALL s/ALL] s1))
(= s1 (s/transform s/VOID inc s1))
(= s1 (s/transform [s/ALL s/VOID s/ALL] inc s1))
(= (s/transform [s/ALL (s/cond-path even? nil odd? s/VOID)] inc s1)
(empty? (s/select s/STOP s1))
(empty? (s/select [s/STOP s/ALL s/ALL s/ALL s/ALL] s1))
(= s1 (s/transform s/STOP inc s1))
(= s1 (s/transform [s/ALL s/STOP s/ALL] inc s1))
(= (s/transform [s/ALL (s/cond-path even? nil odd? s/STOP)] inc s1)
(s/transform [s/ALL even?] inc s1))
)))