 
 (def any
   {:type :match/any})
+
+(def return
+  {:type :match/return})
 
 (def replace
   {:type :replace})

        (try
          (let [vars #js {}]
            (run-match-pattern id->node pattern (:path input) (:value input) output stack vars)
            (run-node id->node node (map #(aget vars %) inputs) output stack))
          (catch MatchFailure _
            (recur branches)))
        (throw (MatchFailure.))))))


(defn run-node [id->node node inputs output stack]
  (case (:type node)
    :data (run-data id->node node inputs output stack)
    :ref (run-ref id->node node inputs output stack)
    :match (run-match id->node node inputs output stack)
    :replace (run-replace id->node node inputs output stack)
    :output (run-output id->node node inputs output stack)))

(defn run-data [id->node node inputs output stack]
  (assert (empty? inputs))
