Unwire the things for parser refactor

This commit is contained in:
Scott Richmond 2023-05-02 19:15:05 -04:00
parent 197f4772ba
commit 963c63aed3
3 changed files with 7 additions and 11 deletions

View File

@ -11,7 +11,7 @@
(:gen-class))
(defn- run [file source]
(let [scanned (scanner/scan source)]
(comment (let [scanned (scanner/scan source)]
(if (not-empty (:errors scanned))
(do
(println "I found some scanning errors!")
@ -25,13 +25,13 @@
(System/exit 66))
(let [interpreted (interpreter/interpret parsed file)]
(println (show/show interpreted))
(System/exit 0)))))))
(System/exit 0))))))))
(defn -main [& args]
(cond
(comment (cond
(= (count args) 1)
(let [file (first args)
source (loader/load-import file)]
(run file source))
:else (repl/launch)))
:else (repl/launch))))

View File

@ -1224,7 +1224,7 @@
(parser)
(parse-script)))
(do
(comment (do
(def my-source "
data Foo {foo, bar}
data Bar as {
@ -1234,7 +1234,7 @@ data Bar as {
")
(::ast (parse (scanner/scan my-source))))
(::ast (parse (scanner/scan my-source)))))
(comment "
Further thoughts/still to do:

View File

@ -96,11 +96,7 @@
(def draw {:name "draw"
::data/type ::data/clj
:body draw/ludus-draw})
(def draw {:name "draw"
::data/type ::data/clj
:body d/draw})
:body d/ludus-draw})
(def prelude {"eq" eq
"add" add