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

Method printForTrace

output/java/1.4.19/Interpreter.java:1377–1395  ·  view source on GitHub ↗
(StringBuilder tr, InstanceScope scope, Object o)

Source from the content-addressed store, hash-verified

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

Callers 1

traceMethod · 0.95

Calls 4

nextMethod · 0.65
appendMethod · 0.45
hasNextMethod · 0.45

Tested by

no test coverage detected