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

Method printForTrace

output/java/1.4.17/Interpreter.java:1375–1393  ·  view source on GitHub ↗
(StringBuilder tr, InstanceScope scope, Object o)

Source from the content-addressed store, hash-verified

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

Callers 1

traceMethod · 0.95

Calls 4

nextMethod · 0.65
appendMethod · 0.45
hasNextMethod · 0.45

Tested by

no test coverage detected