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

Method printForTrace

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

Source from the content-addressed store, hash-verified

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

Callers 1

traceMethod · 0.95

Calls 4

nextMethod · 0.65
appendMethod · 0.45
hasNextMethod · 0.45

Tested by

no test coverage detected