[stringtemplate-interest] nesting templates and getting the loop count of the outer loop
Roel Vanhout
rvanhout at riks.nl
Mon Oct 27 09:49:54 PDT 2008
Hi,
I have situation similar to what was asked here:
http://markmail.org/message/izumze7jxytlwsds#query:stringtemplate%20i0+p
age:1+mid:izumze7jxytlwsds+state:results
<http://markmail.org/message/izumze7jxytlwsds#query:stringtemplate%20i0+
page:1+mid:izumze7jxytlwsds+state:results> but the results that the
poster there gets are not the same for me. A regression maybe, or
differences in the Java/C# version? Or more probable, me missing
something.
My problem is as follows: I have templates like this:
initialize_dlg(group_nr) ::= <<
m_DialogIndexes["<group_nr>,<i0>"] = newdlg<it.ViewName>; }
>>
initialize_dlgs() ::= <<
<it.Pages:initialize_dlg(group_nr=i0);separator="\n">
>>
The expexted output is for <group_nr> (in initialize_dlg) to be 0 a
couple of times, then 1 a couple of times etc. However, <group_nr> and
<i0> are always the same in initialize_dlg, which leads me to believe
that <group_nr> is somehow passed not as the value of i0 in
initialize_dlgs() but as a string literal 'i0' which is then
re-evaluated in initialize_dlg.
I'm using StringTemplate 3.0.1 for C#. Thanks.
cheers,
roel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org:8080/pipermail/stringtemplate-interest/attachments/20081027/24484d20/attachment.html
More information about the stringtemplate-interest
mailing list