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

Method test4

output/java/1.4.19/STViz.java:519–531  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 {

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