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

Method printForTrace

output/java/1.4.15/Interpreter.java:1373–1391  ·  view source on GitHub ↗
(StringBuilder tr, InstanceScope scope, Object o)

Source from the content-addressed store, hash-verified

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

Callers 1

traceMethod · 0.95

Calls 4

nextMethod · 0.65
appendMethod · 0.45
hasNextMethod · 0.45

Tested by

no test coverage detected