I have added a StringTemplate literal `...` (back quotes):
ST s = `public <name> = <init>;`; s["name"] = "Ter"; s["init"] = "34"; println(s.toString()); println(s["init"]);
emits
public Ter = 34;
34
The attributes of a template act like dictionary entries.
Comments (2)
Jan 23, 2008
Anonymous says:
Nice... I wonder if some similar integration with http://ptilde...Nice...
I wonder if some similar integration with http://ptilde.pbwiki.com/ (mainly because its regexp engine) would worth.
Mar 16
Anonymous says:
In version mantra-1.0a4.jar, there is a problem with ("). They need to be backsl...In version mantra-1.0a4.jar, there is a problem with ("). They need to be backslashed.
The following fails to compile in the javac phase:
The following works:
Add Comment