add postlude

This commit is contained in:
Scott Richmond 2024-06-06 10:36:55 -04:00
parent d84a930073
commit 125a299b10

View File

@ -27,3 +27,16 @@
(set (ctx "^name") nil)
(set (ctx "^type") nil)
ctx))
(def post/src (slurp "postlude.ld"))
(def post/ast (do
(def post-ctx @{:^parent ctx})
(def post-scanned (s/scan post/src :postlude))
(def post-parsed (p/parse post-scanned))
(def parse-errors (post-parsed :errors))
(when (any? parse-errors) (each err parse-errors (e/parse-error err)) (break :error))
(def post-validated (v/valid prelude-parsed post-ctx))
(def validation-errors (prelude-validated :errors))
(when (any? validation-errors) (each err validation-errors (e/validation-error err)) (break :error))
post-parsed))