Improve defhsx
This commit is contained in:
parent
3b26614d2b
commit
a02e924a44
1 changed files with 5 additions and 4 deletions
|
@ -13,10 +13,11 @@
|
|||
;;;; hsx definitions
|
||||
|
||||
(defmacro defhsx (name element-type)
|
||||
`(defmacro ,name (&body body)
|
||||
(multiple-value-bind (props children)
|
||||
(parse-body body)
|
||||
`(create-element ,',element-type (list ,@props) ,@children))))
|
||||
(eval-when (:compile-toplevel :load-toplevel :execute)
|
||||
`(defmacro ,name (&body body)
|
||||
(multiple-value-bind (props children)
|
||||
(parse-body body)
|
||||
`(create-element ,',element-type (list ,@props) ,@children)))))
|
||||
|
||||
(defun parse-body (body)
|
||||
(if (keywordp (first body))
|
||||
|
|
Loading…
Reference in a new issue