clean up
This commit is contained in:
parent
4a069278b8
commit
d4adc1d912
|
@ -1148,11 +1148,12 @@
|
|||
(def origin (current parser))
|
||||
(def lines @[])
|
||||
(while (not (check parser :eof))
|
||||
(print "starting script loop with " (pp-tok origin))
|
||||
# (print "starting script loop with " (pp-tok origin))
|
||||
(accept-many parser :newline :semicolon)
|
||||
(when (= :break ((current parser) :type))
|
||||
(break (advance parser)))
|
||||
(array/push lines (capture toplevel parser))
|
||||
(def term (capture toplevel parser))
|
||||
(array/push lines term)
|
||||
(capture terminator parser))
|
||||
{:type :script :data lines :token origin})
|
||||
|
||||
|
@ -1162,10 +1163,15 @@
|
|||
(set (parser :ast) ast)
|
||||
parser)
|
||||
|
||||
(do
|
||||
# (comment
|
||||
# (do
|
||||
(comment
|
||||
(def source `
|
||||
(foo bar)
|
||||
{
|
||||
foo bar
|
||||
quux frobulate
|
||||
baz
|
||||
12 23 42
|
||||
}
|
||||
`)
|
||||
(def scanned (s/scan source))
|
||||
# (print "\n***NEW PARSE***\n")
|
||||
|
|
Loading…
Reference in New Issue
Block a user