Add testing status to run

This commit is contained in:
Scott Richmond 2023-12-24 14:22:16 -05:00
parent 46817bd4e5
commit b723532d1a

View File

@ -30,11 +30,13 @@
(defn clean-out [value]
#?(:clj value :cljs (clj->js value)))
(defn run [source]
(defn run
([source] (run source false))
([source testing?]
(let [user_scanned (s/scan source "user input")
user_tokens (:tokens user_scanned)
user_parsed (p/apply-parser g/script user_tokens)
user_result (i/interpret-safe source user_parsed {})
user_result (i/interpret-safe source user_parsed {::i/testing? testing?})
result_str (show/show user_result)
post_scanned (s/scan pre/postlude "postlude")
post_tokens (:tokens post_scanned)
@ -57,6 +59,9 @@
(clean-out clj_result)
)
))
)
(defn test [source] (run source true))
(comment
(def source "