Expose parse function
This commit is contained in:
parent
fc035eb1ba
commit
5baa4fe3ba
|
@ -419,9 +419,16 @@
|
|||
|
||||
))))
|
||||
|
||||
(defn parse [lexed]
|
||||
(-> lexed
|
||||
(:tokens)
|
||||
(parser)
|
||||
(parse-script)
|
||||
))
|
||||
|
||||
(do
|
||||
(def pp pp/pprint)
|
||||
(def source "nil")
|
||||
(def source "42")
|
||||
(def lexed (scanner/scan source))
|
||||
(def tokens (:tokens lexed))
|
||||
(def p (parser tokens))
|
||||
|
@ -434,7 +441,7 @@
|
|||
|
||||
(-> p
|
||||
(parse-script)
|
||||
(::ast)
|
||||
;;(::ast)
|
||||
(pp)
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user