Fix bug with empty blocks

This commit is contained in:
Scott Richmond 2022-03-19 12:27:47 -04:00
parent 37b9560ee3
commit e616dcd453

View File

@ -236,7 +236,7 @@
(case (token-type parser)
::token/rbrace (let [es (add-member exprs current_expr)]
(if (empty? es)
(panic parser "Blocks must have at least one expression")
(advance (panic parser "Blocks must have at least one expression"))
(assoc (advance parser) ::ast {
::ast/type ::ast/block
:exprs es