I'm trying to create my own template generation tool for HTML, which I want to look like this:
(!DOCTYPE)[HTML]
(html){
(head){(title){Page Title}}
(body){
(h1){Heading}[.class #id hidden attr:value "attr two":"value two"]
(p){Paragraph of Text}[.p-class #p-id]
}
}[lang:en]
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?