Exemple #1
0
 int before(ConstructRawPtr cp) {
     int ret = m_functionOnly ? FunctionWalker::before(cp) : WalkContinue;
     cp->dumpNode(m_spc, m_ar);
     m_spc += 2;
     m_showEnds = false;
     return ret;
 }
Exemple #2
0
 int after(ConstructRawPtr cp) {
     if (m_showEnds) {
         int s = m_spc;
         while (s > 0) {
             int n = s > 10 ? 10 : s;
             std::cout << ("          "+10-n);
             s -= n;
         }
         std::cout << "<<";
         cp->dumpNode(0, m_ar);
     }
     m_spc -= 2;
     return WalkContinue;
 }
Exemple #3
0
 int after(ConstructRawPtr cp) {
   if (m_showEnds) {
     int s = m_spc;
     while (s > 0) {
       int n = s > 10 ? 10 : s;
       std::cout << ("          "+10-n);
       s -= n;
     }
     std::cout << "<<";
     cp->dumpNode(0, m_ar);
   }
   m_spc -= 2;
   // HACK: dump the closure function as a "child" of the
   // closure expression
   ClosureExpressionPtr c =
     dynamic_pointer_cast<ClosureExpression>(cp);
   if (c) {
     c->getClosureFunction()->dump(m_spc, m_ar);
   }
   return WalkContinue;
 }