Exemplo n.º 1
0
utArray<Expression *> *TypeCompiler::visitExpressionArray(
    utArray<Expression *> *_expressions)
{
    if (_expressions != NULL)
    {
        utArray<Expression *>& expressions = *_expressions;

        for (unsigned int i = 0; i < expressions.size(); i++)
        {
            expressions[i] = visitExpression(expressions[i]);
        }
    }

    return _expressions;
}
Exemplo n.º 2
0
bool Visitor::visitExpression(ExprConstSP ptr)
{
    unsigned int numberOfChildren = ptr->numberOfChildren();
    for (unsigned int index = 0; index < numberOfChildren; index++)
    {
        if (!visitExpression(ptr->getChild(index)))
        {
            reset();
            return false;
        }
    }
    if (!(ptr->acceptVisitor(*this)))
    {
        reset();
        return false;
    }
    return true;
}