()
| 505 | } |
| 506 | |
| 507 | public static void test4() throws IOException |
| 508 | { |
| 509 | String templates = "main(t) ::= <<\n"+"hi: <t>\n"+">>\n"+"foo(x,y={hi}) ::= \"<bar(x,y)>\"\n"+"bar(x,y) ::= << <y> >>\n"+"ignore(m) ::= \"<m>\"\n"; |
| 510 | STGroup group = new STGroupString(templates); |
| 511 | ST st = group.getInstanceOf("main"); |
| 512 | ST foo = group.getInstanceOf("foo"); |
| 513 | st.add("t", foo); |
| 514 | ST ignore = group.getInstanceOf("ignore"); |
| 515 | ignore.add("m", foo); // embed foo twice! |
| 516 | st.inspect(); |
| 517 | st.render(); |
| 518 | } |
| 519 | |
| 520 | public static void writeFile(String dir, String fileName, String content) { |
| 521 | try { |
no test coverage detected