more cleanup

This commit is contained in:
Scott Richmond 2024-05-18 17:05:14 -04:00
parent 95054ef234
commit 88aaf864ab

View File

@ -622,33 +622,12 @@ Imports are for a later iteration of Ludus:
(def validator (new-validator ast)) (def validator (new-validator ast))
(validate validator)) (validate validator))
(do # (do
# (comment (comment
(def source ` (def source `
let "{foo}" = "bar" let "{foo}" = "bar"
`) `)
(def scanned (s/scan source)) (def scanned (s/scan source))
(def parsed (p/parse scanned)) (def parsed (p/parse scanned))
(valid parsed) (valid parsed)
(print "VALIDATED!!") )
(def grammar (get-in parsed [:ast :data 0 :data 0 :grammar]))
(pp grammar)
(peg/match grammar "foo"))
(def bar @{
:0 ""
:1 '(<- (to :2))
:2 ""
:main '(sequence :0 :1 :2 -1)
})
(peg/match bar "foo")
(def foo @{
:0 ""
:1 '(<- (to :2))
:2 -1
:main '(sequence :0 :1 :2)
})
(peg/match foo "foooooooobar")