Example #1
0
        private static SyntaxNode FunctionCall(RParser.FunctionCallContext call, Func <ParserRuleContext, Scope, SyntaxNode> transform, Scope scope)
        {
            var expr = transform(call.expr(), scope) as ExpressionSyntax;
            var args = transform(call.sublist(), scope) as ArgumentListSyntax;

            Debug.Assert(expr != null && args != null);
            if (expr is IdentifierNameSyntax)
            {
                return(createInvocation(expr.ToString(), args));
            }

            throw new NotImplementedException();
        }
Example #2
0
 /// <summary>
 /// Exit a parse tree produced by <see cref="RParser.FunctionCall"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitFunctionCall([NotNull] RParser.FunctionCallContext context)
 {
 }