[stringtemplate-interest] How to write a helper template/macro for common stuff in a template (i.e. model and controller independent)

Terence Parr parrt at cs.usfca.edu
Fri Jul 17 14:18:58 PDT 2009


use a Java class whose toString method returns String.valueOf(counter+ 
+).
Ter
On Jul 17, 2009, at 1:29 AM, Barrie Treloar wrote:

>> For my case, what I think I want is something like:
>>  <[1..6]: {RETYPE [<it>] 0}>
>> where [1..6] creates a list on the fly for me of the values  
>> [1,2,3,4,5,6]
>
> Thanks for the suggestions, this prompted me to try
>
> <[1,2,3,4,5,6]: {RETYPE [<it>] 0<\n>}>
>
> which does what I want but not entirely sure its any better than
> pasting in the lines 6 times.



More information about the stringtemplate-interest mailing list