MCPcopy Create free account
hub / github.com/antlr/codebuff / test4

Method test4

output/java8/1.4.15/STViz.java:513–524  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

511 }
512
513 public static void test4() throws IOException
514 {
515 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";
516 STGroup group = new STGroupString(templates);
517 ST st = group.getInstanceOf("main");
518 ST foo = group.getInstanceOf("foo");
519 st.add("t", foo);
520 ST ignore = group.getInstanceOf("ignore");
521 ignore.add("m", foo); // embed foo twice!
522 st.inspect();
523 st.render();
524 }
525
526 public static void writeFile(String dir, String fileName, String content) {
527 try {

Callers 1

mainMethod · 0.95

Calls 4

addMethod · 0.95
inspectMethod · 0.95
renderMethod · 0.95
getInstanceOfMethod · 0.45

Tested by

no test coverage detected