Exemple #1
0
void FunctionNode::Accept(Visitor& visitor)
{
    try
    {
        visitor.BeginVisit(*this);
        if (!visitor.SkipContent())
        {
            templateParameters.Accept(visitor);
            parameters.Accept(visitor);
            if (visitor.VisitBodies())
            {
                if (body)
                {
                    body->Accept(visitor);
                }
            }
        }
        visitor.EndVisit(*this);
    }
    catch (Cm::Ast::Exception& ex)
    {
        ex.AddReference(GetSpan());
        throw;
    }
}
Exemple #2
0
void BoundFunction::Accept(Visitor& visitor)
{
    visitor.BeginVisit(*this);
    if (visitor.VisitFunctionBody())
    {
        if (body)
        {
            body->Accept(visitor);
        }
    }
    visitor.EndVisit(*this);
}
Exemple #3
0
void CompileUnitNode::Accept(Visitor& visitor)
{
    visitor.BeginVisit(*this);
    globalNs->Accept(visitor);
    visitor.EndVisit(*this);
}