public override Node VisitInvocation([NotNull] VeeParser.InvocationContext context) { var argNodes = context.argument().Select(arg => arg.Wildcard() != null ? new Node(arg.Wildcard().Symbol.Text, NodeType.Wildcard) : Visit(arg.expression())); return(new Node("call", NodeType.Invocation, new[] { Visit(context.expression()) }.Concat(argNodes).ToArray())); }
/// <summary> /// Visit a parse tree produced by the <c>invocation</c> /// labeled alternative in <see cref="VeeParser.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 VisitInvocation([NotNull] VeeParser.InvocationContext context) { return(VisitChildren(context)); }