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; } }
void BoundFunction::Accept(Visitor& visitor) { visitor.BeginVisit(*this); if (visitor.VisitFunctionBody()) { if (body) { body->Accept(visitor); } } visitor.EndVisit(*this); }
void CompileUnitNode::Accept(Visitor& visitor) { visitor.BeginVisit(*this); globalNs->Accept(visitor); visitor.EndVisit(*this); }