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

Method printForTrace

output/java/1.4.12/Interpreter.java:1357–1376  ·  view source on GitHub ↗
(StringBuilder tr, InstanceScope scope, Object o)

Source from the content-addressed store, hash-verified

1355 }
1356
1357 protected void printForTrace(StringBuilder tr, InstanceScope scope, Object o) {
1358 if ( o instanceof ST) {
1359 if ( ((ST)o).impl==null ) tr.append("bad-template()");
1360 else tr.append(" "+((ST)o).impl.name+"()");
1361 return;
1362 }
1363 o = convertAnythingIteratableToIterator(scope, o);
1364 if ( o instanceof Iterator) {
1365 Iterator<?> it = (Iterator<?>)o;
1366 tr.append(" [");
1367 while ( it.hasNext() ) {
1368 Object iterValue = it.next();
1369 printForTrace(tr, scope, iterValue);
1370 }
1371 tr.append(" ]");
1372 }
1373 else {
1374 tr.append(" "+o);
1375 }
1376 }
1377
1378 public List<InterpEvent> getEvents() {
1379 return events;

Callers 1

traceMethod · 0.95

Calls 4

nextMethod · 0.65
appendMethod · 0.45
hasNextMethod · 0.45

Tested by

no test coverage detected