[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Re: hart.egg
From: |
Hans Bulfone |
Subject: |
[Chicken-users] Re: hart.egg |
Date: |
Thu, 8 Mar 2007 23:49:55 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
hi,
On Thu, Mar 08, 2007 at 06:31:50AM -0500, Graham Fawcett wrote:
> OK, I've added (begin: ...). BTW, one of these days I plan to add a
> (define-hart-keyword) procedure so you can write application-specific
> keyword forms.
sounds great!
> I've also modified the parser and macros to accept multiple
> expressions. So you can now write:
>
> (hart (raw: "<!DOCTYPE html PUBLIC .....\n")
> (html (body ...)))
>
> as you suggested. Please update from svn and let me know how it works for
> you.
works fine, tnx!
imho you can do (for-each hart-parse-form body) instead of
(hart-emit (apply hart-parse body)) in the definition of (begin...)
which generates more efficient code:
#;2> ,x (hart (html (begin: "foo" (a "test") (t: x) 99)))
(noop (begin
(print* "<html>foo<a>test</a>")
(apply print* (map hart-html-escape (list x)))
(print* "99</html>")))
vs
#;10> ,x (hart (html (begin: "foo" (a "test") (t: x) 99)))
(noop (begin
(print* "<html>")
(begin
(print* "foo<a>test</a>")
(apply print* (map hart-html-escape (list x)))
(print* "99"))
(print* "</html>")))
bye,
hans.