Help with macros needed

I'm trying to create my own template generation tool for HTML, which I want to look like this:

    (head){(title){Page Title}}
        (h1){Heading}[.class #id hidden attr:value "attr two":"value two"]
        (p){Paragraph of Text}[.p-class #p-id]

I'm trying to come up with a way to use macro_rules! for this, but I've gotten a bit stuck at this:

How do I make the macro recursive, for it to be able to call itself for tags which come next, as well for tags, included in {content}? Is the macro the wrong tool for the job here? Or what am I missing?

This seems relevant:

1 Like

may be helpful. It hasn't been updated for a long time though.
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.