This commit is contained in:
paku 2024-05-29 12:57:51 +09:00
parent 9d4d1aa9b6
commit 5a63bf8154
4 changed files with 4 additions and 10 deletions

View file

@ -4,7 +4,6 @@
#:deftag))
(in-package #:hsx/builtin)
(defmacro define-builtin-tags (&rest names)
`(progn
,@(mapcan (lambda (name)

View file

@ -9,7 +9,6 @@
#:defcomp))
(in-package #:hsx/defhsx)
(defmacro defhsx (name element-type)
`(defmacro ,name (&body body)
(multiple-value-bind (props children)

View file

@ -8,7 +8,6 @@
#:render))
(in-package #:hsx/element)
;;;; class definitions
(defclass element ()
@ -30,7 +29,6 @@
(defclass component (element) ())
;;;; factory
(defun create-element (type props &rest children)
@ -52,9 +50,12 @@
(rec (cdr x) acc))))))
(rec x nil)))
;;;; methods
(defmethod render ((element element) &key minify)
(with-output-to-string (stream)
(write element :stream stream :pretty (not minify))))
(defmethod print-object ((element tag) stream)
(with-accessors ((type element-type)
(props element-props)
@ -115,7 +116,3 @@
(append props
(and children
(list :children children))))
(defmethod render ((element element) &key minify)
(with-output-to-string (stream)
(write element :stream stream :pretty (not minify))))

View file

@ -3,7 +3,6 @@
(:export #:hsx))
(in-package #:hsx/hsx)
(defmacro hsx (&body form)
(when (not (= (length form) 1))
(error "The body of the hsx macro must be a single form."))