reader macro allows for embedding in lisp expressions with <@ in

opening tag
This commit is contained in:
a. fox 2024-01-28 15:11:26 -05:00
parent 171abf1e7d
commit 569ee3964c
2 changed files with 5 additions and 6 deletions

View File

@ -2,12 +2,6 @@
** Improve Reader Macro
*** Allow HTML to be embedded in lisp
Currently, the first time =read-html-tag= gets called (from the lisp reader) it will generate a function structure.
while this is good for generic top-level statements, it would be ideal for the lisp reader to be smart enough to
detect that HTML is embedded and should return a string.
*** Comments
overriding the reader also causes some weirdness with regard to handling comments.

View File

@ -71,6 +71,11 @@ returns a plist with the cleaned HTML and the s-expressions"
(declare (ignore char))
(let ((next-char (peek-char nil stream)))
(when (char= next-char #\@)
(read-char stream)
(setf define-function nil
next-char (peek-char nil stream)))
(if (or (alpha-char-p next-char)
(char= next-char #\/))
(let* ((tag-and-attrs