public override Node VisitCallFunction(TParser.CallFunctionContext context) { var target = Visit(context.expression()); var @params = context.commaExpressions() == null ? new NodesCollection <Node>(context.Start) : Visit(context.commaExpressions()).As <NodesCollection <Node> >(); return(new FunctionCall(target, @params, context.Start)); }
/// <summary> /// Visit a parse tree produced by the <c>CallFunction</c> /// labeled alternative in <see cref="TParser.expression"/>. /// <para> /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/> /// on <paramref name="context"/>. /// </para> /// </summary> /// <param name="context">The parse tree.</param> /// <return>The visitor result.</return> public virtual Result VisitCallFunction([NotNull] TParser.CallFunctionContext context) { return(VisitChildren(context)); }
/// <summary> /// Exit a parse tree produced by the <c>CallFunction</c> /// labeled alternative in <see cref="TParser.expression"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitCallFunction([NotNull] TParser.CallFunctionContext context) { }