fix imports
This commit is contained in:
parent
3e9f38ef5c
commit
c68d08e8b2
|
@ -1,7 +1,7 @@
|
|||
### A recursive descent parser for Ludus
|
||||
|
||||
### We still need to scan some things
|
||||
#(os/cd "janet") # when in repl to do relative imports
|
||||
(try (os/cd "janet") ([_] nil)) # when in repl to do relative imports
|
||||
(import ./scanner :as s)
|
||||
|
||||
(defmacro declare
|
||||
|
@ -1090,8 +1090,8 @@
|
|||
)
|
||||
|
||||
|
||||
(do
|
||||
#(comment
|
||||
# (do
|
||||
(comment
|
||||
(def source `
|
||||
loop (1, 2) with (x, y) -> :bar
|
||||
`)
|
||||
|
|
|
@ -21,9 +21,9 @@ Imports are for a later iteration of Ludus:
|
|||
* [ ] correct imports DEFERRED
|
||||
)
|
||||
|
||||
|
||||
(import ./recursive :as p)
|
||||
(try (os/cd "janet") ([_] nil))
|
||||
(import ./scanner :as s)
|
||||
(import ./parser :as p)
|
||||
|
||||
(defn- new-validator [parser]
|
||||
(def ast (parser :ast))
|
||||
|
@ -583,8 +583,12 @@ Imports are for a later iteration of Ludus:
|
|||
|
||||
(set validate validate*)
|
||||
|
||||
(do
|
||||
#(comment
|
||||
(defn valid [ast]
|
||||
(def validator (new-validator ast))
|
||||
(validate validator))
|
||||
|
||||
# (do
|
||||
(comment
|
||||
(def source `
|
||||
fn bar () -> :bar
|
||||
fn foo () -> match :foo with {
|
||||
|
@ -594,8 +598,4 @@ fn foo () -> match :foo with {
|
|||
`)
|
||||
(def scanned (s/scan source))
|
||||
(def parsed (p/parse scanned))
|
||||
(def validator (new-validator parsed))
|
||||
(pp validator)
|
||||
(validate validator)
|
||||
(pp parsed)
|
||||
)
|
||||
(valid parsed))
|
||||
|
|
Loading…
Reference in New Issue
Block a user