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