diff --git a/src/builtin.lisp b/src/builtin.lisp index 7b02286..91d446b 100644 --- a/src/builtin.lisp +++ b/src/builtin.lisp @@ -4,7 +4,6 @@ #:deftag)) (in-package #:hsx/builtin) - (defmacro define-builtin-tags (&rest names) `(progn ,@(mapcan (lambda (name) diff --git a/src/defhsx.lisp b/src/defhsx.lisp index 18b41c9..9eb5fd4 100644 --- a/src/defhsx.lisp +++ b/src/defhsx.lisp @@ -9,7 +9,6 @@ #:defcomp)) (in-package #:hsx/defhsx) - (defmacro defhsx (name element-type) `(defmacro ,name (&body body) (multiple-value-bind (props children) diff --git a/src/element.lisp b/src/element.lisp index cf43c93..f05e9bb 100644 --- a/src/element.lisp +++ b/src/element.lisp @@ -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)))) diff --git a/src/hsx.lisp b/src/hsx.lisp index b1d68c7..9c814e5 100644 --- a/src/hsx.lisp +++ b/src/hsx.lisp @@ -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."))