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

Method printForTrace

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

Source from the content-addressed store, hash-verified

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

Callers 1

traceMethod · 0.95

Calls 4

nextMethod · 0.65
appendMethod · 0.45
hasNextMethod · 0.45

Tested by

no test coverage detected