Add error for invalid props declaration.

This commit is contained in:
Akira Tempaku 2024-06-02 21:01:11 +09:00
commit bce01c3c42
2 changed files with 6 additions and 5 deletions

View file

@ -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