()
| 517 | } |
| 518 | |
| 519 | public static void test4() throws IOException |
| 520 | { |
| 521 | String templates = "main(t) ::= <<\n"+"hi: <t>\n"+">>\n"+"foo(x,y={hi}) ::= \"<bar(x,y)>\"\n"+ |
| 522 | "bar(x,y) ::= << <y> >>\n" +"ignore(m) ::= \"<m>\"\n"; |
| 523 | STGroup group = new STGroupString(templates); |
| 524 | ST st = group.getInstanceOf("main"); |
| 525 | ST foo = group.getInstanceOf("foo"); |
| 526 | st.add("t", foo); |
| 527 | ST ignore = group.getInstanceOf("ignore"); |
| 528 | ignore.add("m", foo); // embed foo twice! |
| 529 | st.inspect(); |
| 530 | st.render(); |
| 531 | } |
| 532 | |
| 533 | public static void writeFile(String dir, String fileName, String content) { |
| 534 | try { |
no test coverage detected