[stringtemplate-interest] maps, length, wrapping
Terence Parr
parrt at cs.usfca.edu
Sat Jan 28 15:07:36 PST 2006
On Jan 28, 2006, at 2:57 PM, Kay Roepke wrote:
>
> On 28. Jan 2006, at 23:54 Uhr, Terence Parr wrote:
>
>> i'll be adding length most likely and fixing map iteration :)
>
> i'll bug you no further ;)
Bugging is probably only way to get anything done during the semester ;)
So <length(names)> is the answer, right? It will yield a string with
0, 1 or n for any attribute. Iterable ones get walked and counted
(slow but general). Also we want <m:{key | <key>, <m.(key)>}> for
walking maps, right?
How can we insert a newline when length is greater than 80? Technically
<if(length(names)>80)><\n><endif>
doesn't break the rules but then I must do flow analysis to prevent
you from testing attribute values.
Ter
More information about the stringtemplate-interest
mailing list