[stringtemplate-interest] getting started - string template 3
Tomasz Jastrzebski
tdjastrzebski at yahoo.com
Sun Aug 23 08:20:39 PDT 2009
Hello Developers,
I am just trying to evaluate string template 3. I downloaded and compiled .Net solution. In the "StringTemplateTests (VS2005)" project I found some simple NUnit tests. The first problem I came across is that although those tests run they do not yeld expected results. The finall st.ToString() call returns empty string - example below. Am I missing something?
Thomas
string templateText = "group speed;\n"
+ "literal() : <<A template with just a single longish literal in it>>\n"
+ "bold() : << <b>$attr$</b> >>\n"
+ "st1(name) : <<A template with just a single attr $name$ in it>>\n"
+ "st2(names) : <<$names:bold()$>>\n";
StringTemplateGroup group = new StringTemplateGroup(new System.IO.StringReader(templateText));
StringTemplate st = group.GetInstanceOf("literal");
string text = st.ToString();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20090823/c6fe0af2/attachment.html
More information about the stringtemplate-interest
mailing list