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
|
(do
|
||||||
(comment
|
# (comment
|
||||||
(def source `
|
(def source `
|
||||||
pkg Baz {Foo, Bar}
|
print! ("hello")
|
||||||
`)
|
`)
|
||||||
(def scanned (s/scan source))
|
(def scanned (s/scan source))
|
||||||
(print "\n***NEW PARSE***\n")
|
(print "\n***NEW PARSE***\n")
|
||||||
|
@ -1140,7 +1140,6 @@ pkg Baz {Foo, Bar}
|
||||||
# (print (pp-ast parsed))
|
# (print (pp-ast parsed))
|
||||||
# (pp scanned)
|
# (pp scanned)
|
||||||
(pp parsed)
|
(pp parsed)
|
||||||
(pp (a-parser :errors))
|
|
||||||
# (def cleaned (get-in parsed [:data 2]))
|
# (def cleaned (get-in parsed [:data 2]))
|
||||||
# (pp cleaned)
|
# (pp cleaned)
|
||||||
)
|
)
|
||||||
|
|
|
@ -341,3 +341,5 @@
|
||||||
(recur (-> scanner (scan-token) (next-token)))))
|
(recur (-> scanner (scan-token) (next-token)))))
|
||||||
(recur (new-scanner source input)))
|
(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)
|
(set (validator :ast) value)
|
||||||
(validate validator)
|
(validate validator)
|
||||||
(def entry (if (= :pkg-name (value :type))
|
(def entry (if (= :pkg-name (value :type))
|
||||||
(resolve-name (value :name) (validator :ctx))
|
(resolve-name (validator :ctx) (string (value :data)))
|
||||||
value))
|
value))
|
||||||
|
(print "entry at " (key :data))
|
||||||
|
(pp entry)
|
||||||
(set (status :pkg-access?) nil)
|
(set (status :pkg-access?) nil)
|
||||||
(def kw (key :data))
|
(def kw (key :data))
|
||||||
(pp kw)
|
(pp kw)
|
||||||
|
@ -724,10 +726,11 @@ Deferred until a later iteration of Ludus:
|
||||||
(def source `
|
(def source `
|
||||||
let foo = 1
|
let foo = 1
|
||||||
pkg Foo {foo}
|
pkg Foo {foo}
|
||||||
pkg Baz {Foo}
|
pkg Baz {Foo, foo}
|
||||||
Foo :Baz
|
Baz :Foo :bar
|
||||||
`)
|
`)
|
||||||
(def scanned (s/scan source))
|
(def scanned (s/scan source))
|
||||||
(def parsed (p/parse scanned))
|
(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