Add error for invalid props declaration.
This commit is contained in:
parent
a6bfe77c1f
commit
bce01c3c42
2 changed files with 6 additions and 5 deletions
src
|
@ -37,6 +37,10 @@
|
|||
(defhsx ,name ,(make-keyword name))))
|
||||
|
||||
(defmacro defcomp (name props &body body)
|
||||
(unless (or (null props)
|
||||
(member '&key props)
|
||||
(member '&rest props))
|
||||
(error "Component properties must be declared with either &key, &rest, or both."))
|
||||
(let ((%name (symbolicate '% name)))
|
||||
`(eval-when (:compile-toplevel :load-toplevel :execute)
|
||||
(defun ,%name ,props
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue