Parse ignored words as placeholder

This commit is contained in:
Scott Richmond 2022-04-08 15:23:08 -04:00
parent be2d291fd3
commit 9dc9e95e85

View File

@ -471,7 +471,7 @@
(let [curr (current parser)
type (::token/type curr)]
(case type
::token/placeholder (-> parser
(::token/placeholder ::token/ignored) (-> parser
(advance)
(assoc ::ast {::ast/type ::ast/placeholder}))
@ -762,12 +762,9 @@
(parser)
(parse-script)))
(comment
(do
(def pp pp/pprint)
(def source "ns foo {
:bar 42
:baz 23
}
(def source "let _foo = 42
")
(def lexed (scanner/scan source))