Remove repl cruft

This commit is contained in:
Scott Richmond 2023-05-20 14:20:23 -04:00
parent 4fd593752b
commit 0fe85cf2ed

View File

@ -256,44 +256,3 @@
(def script (order-0 :script [nls? (def script (order-0 :script [nls?
(one+ script-line) (one+ script-line)
(quiet :eof)])) (quiet :eof)]))
;;;;;;;;;;;;;;;; REPL CRUFT
;;TODO: fix forward declaration errors
(def eg (:tokens (scan/scan
"
test \"foo\" bar
"
)))
(def result (apply-parser script eg))
(defn report [node]
(when (fail? node) (err-msg node))
node)
(defn clean [node]
(if (map? node)
(-> node
(report)
(dissoc
:status
:remaining
:token)
(update :data #(into [] (map clean) %)))
node))
(defn tap [x] (println "\n\n\n\n******NEW PARSE\n\n:::=> " x "\n\n") x)
(def my-data (-> result
clean
tap
))
my-data