public override Node VisitExpressionSequence(ECMAScriptParser.ExpressionSequenceContext context)
        {
            var node = new SequenceExpression(context);

            node.Expressions.AddRange(context.singleExpression().Select(Visit).Cast <Expression>());
            return(node);
        }
Ejemplo n.º 2
0
        /// <returns><see cref="MultichildExpression"/></returns>
        public UstNode VisitExpressionSequence([NotNull] ECMAScriptParser.ExpressionSequenceContext context)
        {
            List <Expression> expressions = context.singleExpression()
                                            .Select(expr => Visit(expr).ToExpressionIfRequired())
                                            .Where(expr => expr != null)
                                            .ToList();
            var result = new MultichildExpression(expressions, context.GetTextSpan(), FileNode);

            return(result);
        }