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

Method test4

output/java/1.4.14/STViz.java:515–527  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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