validation error on empty blocks
This commit is contained in:
parent
3b65092267
commit
705be69661
|
@ -74,6 +74,10 @@ Deferred until a later iteration of Ludus:
|
|||
(defn- block [validator]
|
||||
(def ast (validator :ast))
|
||||
(def data (ast :data))
|
||||
(when (= 0 (length data))
|
||||
(array/push (validator :errors)
|
||||
{:node ast :msg "blocks may not be empty"})
|
||||
(break validator))
|
||||
(def status (validator :status))
|
||||
(set (status :toplevel) nil)
|
||||
(def tail? (status :tail))
|
||||
|
|
Loading…
Reference in New Issue
Block a user