all tests passing
This commit is contained in:
parent
e7db1803b1
commit
cbd3db5a75
1 changed files with 15 additions and 9 deletions
|
|
@ -109,7 +109,7 @@
|
||||||
`(let [num-params# ~num-params-code
|
`(let [num-params# ~num-params-code
|
||||||
cfn# (fn [~params-sym ~params-idx-sym vals# ~structure-sym next-fn#]
|
cfn# (fn [~params-sym ~params-idx-sym vals# ~structure-sym next-fn#]
|
||||||
(let [~@binding-declarations]
|
(let [~@binding-declarations]
|
||||||
(next-fn# ~params-sym (+ ~params-idx-sym num-params#) (conj vals# (do ~@body) ~structure-sym))
|
(next-fn# ~params-sym (+ ~params-idx-sym num-params#) (conj vals# (do ~@body)) ~structure-sym)
|
||||||
))]
|
))]
|
||||||
(reify RichNavigator
|
(reify RichNavigator
|
||||||
(~'rich-select* [this# params# params-idx# vals# structure# next-fn#]
|
(~'rich-select* [this# params# params-idx# vals# structure# next-fn#]
|
||||||
|
|
@ -218,14 +218,20 @@
|
||||||
are required, then the result is executable."
|
are required, then the result is executable."
|
||||||
[bindings & body]
|
[bindings & body]
|
||||||
(fixed-pathed-operation bindings
|
(fixed-pathed-operation bindings
|
||||||
(fn [runtime-bindings _ total-params-sym]
|
(fn [runtime-bindings compiled-syms total-params-sym]
|
||||||
`(i/->ParamsNeededPath
|
(let [late-syms (map first (partition 2 bindings))
|
||||||
(collector-with-bindings ~total-params-sym
|
lean-bindings (mapcat vector late-syms compiled-syms)]
|
||||||
~runtime-bindings
|
`(if (zero? ~total-params-sym)
|
||||||
~@body
|
(let [~@lean-bindings]
|
||||||
)
|
(i/no-params-rich-compiled-path
|
||||||
~total-params-sym
|
(collector-with-bindings 0 [] ~@body)))
|
||||||
))))
|
(i/->ParamsNeededPath
|
||||||
|
(collector-with-bindings ~total-params-sym
|
||||||
|
~runtime-bindings
|
||||||
|
~@body
|
||||||
|
)
|
||||||
|
~total-params-sym
|
||||||
|
))))))
|
||||||
|
|
||||||
(defmacro paramsfn [params [structure-sym] & impl]
|
(defmacro paramsfn [params [structure-sym] & impl]
|
||||||
`(nav ~params
|
`(nav ~params
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue