MCPcopy Create free account
hub / github.com/devosoft/avida / VisitUnpackTarget

Method VisitUnpackTarget

avida-core/source/script/cDumpASTVisitor.cc:460–496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

458
459
460void cDumpASTVisitor::VisitUnpackTarget(cASTUnpackTarget& node)
461{
462 m_depth++;
463
464 // Array unpack portion
465 indent();
466 cout << "@{";
467 m_depth++;
468
469 for (int i = 0; i < node.GetSize(); i++) {
470 cout << endl;
471 indent();
472 cout << node.GetVarName(i);
473 }
474 if (node.IsLastNamed()) {
475 cout << "..";
476 } else if (node.IsLastWild()) {
477 cout << endl;
478 indent();
479 cout << "..";
480 }
481 cout << endl;
482 m_depth--;
483 indent();
484 cout << "}" << endl;
485
486 // Equals
487 m_depth--;
488 indent();
489 cout << "=" << endl;
490 m_depth++;
491
492 // Expression portion
493 node.GetExpression()->Accept(*this);
494
495 m_depth--;
496}

Callers 1

AcceptMethod · 0.45

Calls 5

IsLastNamedMethod · 0.80
IsLastWildMethod · 0.80
AcceptMethod · 0.80
GetSizeMethod · 0.45
GetExpressionMethod · 0.45

Tested by

no test coverage detected