示例#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;
 }
示例#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;
 }
示例#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;
 }