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
|
;;;; hsx definitions
|
||||||
|
|
||||||
(defmacro defhsx (name element-type)
|
(defmacro defhsx (name element-type)
|
||||||
|
(eval-when (:compile-toplevel :load-toplevel :execute)
|
||||||
`(defmacro ,name (&body body)
|
`(defmacro ,name (&body body)
|
||||||
(multiple-value-bind (props children)
|
(multiple-value-bind (props children)
|
||||||
(parse-body body)
|
(parse-body body)
|
||||||
`(create-element ,',element-type (list ,@props) ,@children))))
|
`(create-element ,',element-type (list ,@props) ,@children)))))
|
||||||
|
|
||||||
(defun parse-body (body)
|
(defun parse-body (body)
|
||||||
(if (keywordp (first body))
|
(if (keywordp (first body))
|
||||||
|
|
Loading…
Reference in a new issue