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

Method printForTrace

output/java/1.4.14/Interpreter.java:1369–1387  ·  view source on GitHub ↗
(StringBuilder tr, InstanceScope scope, Object o)

Source from the content-addressed store, hash-verified

1367 }
1368
1369 protected void printForTrace(StringBuilder tr, InstanceScope scope, Object o) {
1370 if ( o instanceof ST) {
1371 if ( ((ST)o).impl==null ) tr.append("bad-template()");
1372 else tr.append(" "+((ST)o).impl.name+"()");
1373 return;
1374 }
1375 o = convertAnythingIteratableToIterator(scope, o);
1376 if ( o instanceof Iterator) {
1377 Iterator<?> it = (Iterator<?>)o;
1378 tr.append(" [");
1379 while ( it.hasNext() ) {
1380 Object iterValue = it.next();
1381 printForTrace(tr, scope, iterValue);
1382 }
1383 tr.append(" ]");
1384 } else {
1385 tr.append(" "+o);
1386 }
1387 }
1388
1389 public List<InterpEvent> getEvents() {
1390 return events;

Callers 1

traceMethod · 0.95

Calls 4

nextMethod · 0.65
appendMethod · 0.45
hasNextMethod · 0.45

Tested by

no test coverage detected