示例#1
0
        public UstNode VisitArgumentsExpression([NotNull] ECMAScriptParser.ArgumentsExpressionContext context)
        {
            var target   = (Expression)Visit(context.singleExpression());
            var argsNode = (ArgsNode)Visit(context.arguments());
            var result   = new InvocationExpression(target, argsNode, context.GetTextSpan(), FileNode);

            return(result);
        }
        public override Node VisitArgumentsExpression(ECMAScriptParser.ArgumentsExpressionContext context)
        {
            var node = new CallExpression(context, (Expression)Visit(context.singleExpression()));

            if (context.arguments().argumentList() != null)
            {
                var expressions = context.arguments().argumentList().singleExpression();
                node.Arguments.AddRange(expressions.Select(Visit).Cast <Expression>());
            }
            return(node);
        }