get pkg validation access working for root pkg access, e.g. Foo :bar
and Foo :bar
This commit is contained in:
parent
1dce69e239
commit
524e3627fb
|
@ -1127,10 +1127,10 @@
|
|||
)
|
||||
|
||||
|
||||
# (do
|
||||
(comment
|
||||
(do
|
||||
# (comment
|
||||
(def source `
|
||||
pkg Baz {Foo, Bar}
|
||||
print! ("hello")
|
||||
`)
|
||||
(def scanned (s/scan source))
|
||||
(print "\n***NEW PARSE***\n")
|
||||
|
@ -1140,7 +1140,6 @@ pkg Baz {Foo, Bar}
|
|||
# (print (pp-ast parsed))
|
||||
# (pp scanned)
|
||||
(pp parsed)
|
||||
(pp (a-parser :errors))
|
||||
# (def cleaned (get-in parsed [:data 2]))
|
||||
# (pp cleaned)
|
||||
)
|
||||
|
|
|
@ -341,3 +341,5 @@
|
|||
(recur (-> scanner (scan-token) (next-token)))))
|
||||
(recur (new-scanner source input)))
|
||||
|
||||
(def source `print! ("hello")`)
|
||||
(pp ((scan source) :tokens))
|
||||
|
|
|
@ -513,8 +513,10 @@ Deferred until a later iteration of Ludus:
|
|||
(set (validator :ast) value)
|
||||
(validate validator)
|
||||
(def entry (if (= :pkg-name (value :type))
|
||||
(resolve-name (value :name) (validator :ctx))
|
||||
(resolve-name (validator :ctx) (string (value :data)))
|
||||
value))
|
||||
(print "entry at " (key :data))
|
||||
(pp entry)
|
||||
(set (status :pkg-access?) nil)
|
||||
(def kw (key :data))
|
||||
(pp kw)
|
||||
|
@ -724,10 +726,11 @@ Deferred until a later iteration of Ludus:
|
|||
(def source `
|
||||
let foo = 1
|
||||
pkg Foo {foo}
|
||||
pkg Baz {Foo}
|
||||
Foo :Baz
|
||||
pkg Baz {Foo, foo}
|
||||
Baz :Foo :bar
|
||||
`)
|
||||
(def scanned (s/scan source))
|
||||
(def parsed (p/parse scanned))
|
||||
(def validated (valid parsed b/ctx))
|
||||
(def validated (valid parsed))
|
||||
# (validated :ctx)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user