[stringtemplate-interest] "Allowing enclosing attributes to pass through"
Brain, Jim
JBrain at Aegonusa.com
Mon Nov 30 12:17:36 PST 2009
I'm having trouble getting my attributes to pass through to an sub template:
StringTemplateGroup stg = new StringTemplateGroup("Source");
stg.defineTemplate("Banner","$stuff: {$it$;\n}$");
StringTemplate st = stg.defineTemplate("Parser","$Banner(stuff=\"Jim\", ...)$");
st.setAttribute("stuff","Jack");
System.out.println(st.toString());
I refactored Parser into Parser and Banner, but now when I pass stuff="" into Banner, it completely hides the stuff value set in the Parser template. Is there any way to unhide? I read the same named section from the documentation, which suggested the '...' notation, but that does not appear to change the behavior.
Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20091130/61f9744c/attachment.html
More information about the stringtemplate-interest
mailing list