fix state machine bugs

This commit is contained in:
Jeremy Penner 2013-05-04 00:18:22 -04:00
parent 5548363a06
commit 69c533ceec

View file

@ -211,7 +211,7 @@
::call ::call
[(let [body (next args)] [(let [body (next args)]
`{:eventtype ::return :fnhandler (fn ~@(out-stmfnbody body opts statenext))})] `{:eventtype ::return :fnhandler (fn ~@(out-stmfnbody body opts statenext))})]
[(let [[fnguard body] (if (vector? (first args)) [nil args] args)] [(let [[fnguard & body] (if (vector? (first args)) [nil args] args)]
`{:eventtype ~handlertype :fnguard ~fnguard :fnhandler (fn ~@(out-stmfnbody (ensure-fnbody 2 body) opts statenext))})]))) `{:eventtype ~handlertype :fnguard ~fnguard :fnhandler (fn ~@(out-stmfnbody (ensure-fnbody 2 body) opts statenext))})])))
(defn- out-def-state [stmid [state opts & handlerspecs] statenext] (defn- out-def-state [stmid [state opts & handlerspecs] statenext]