Dashboard > Mantra > ... > Documentation > StringTemplate Integration
  Mantra Log In | Sign Up   View a printable version of the current page.  
  StringTemplate Integration
Added by Terence Parr, last edited by Terence Parr on Nov 03, 2007  (view change)
Labels: 
(None)

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.

Nice... 

I wonder if some similar integration with http://ptilde.pbwiki.com/&nbsp;(mainly because its regexp engine) would worth.

Posted by Anonymous at Jan 23, 2008 06:01
Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.1 Build:#806 May 06, 2007) - Bug/feature request - Contact Administrators