Example #1
0
 void GlobalsCollector::visit(ast::SeqExp & e)
 {
     for (auto _e : e.getExps())
     {
         _e->accept(*this);
     }
 }
void InstrumentVisitor::visit(ast::SeqExp & e)
{
    if (e.getParent() && !e.getParent()->isFunctionDec())
    {
        cover.add(macro, &e);
    }

    instrCounts += e.getExps().size();
    for (auto exp : e.getExps())
    {
        if (exp->isCommentExp())
        {
            --instrCounts;
        }
        else
        {
            cover.add(macro, exp);
            exp->accept(*this);
        }
    }
}
Example #3
0
void SLintVisitor::visit(const ast::SeqExp & e)
{
    const ast::exps_t & exps = e.getExps();
    seqExpIts.emplace(exps.begin(), exps.end());
    auto range = preCheck(e);
    ast::exps_t::const_iterator & seqExpIt = seqExpIts.top().first;
    const ast::exps_t::const_iterator & seqExpEnd = seqExpIts.top().second;
    for (; seqExpIt != seqExpEnd; ++seqExpIt)
    {
        (*seqExpIt)->accept(*this);
    }
    postCheck(e, range);
    seqExpIts.pop();
}