Beispiel #1
0
        public override object VisitExpressionList([NotNull] ExpressionListContext context)
        {
            var r   = new Result();
            var obj = "";

            for (int i = 0; i < context.expression().Length; i++)
            {
                var temp = (Result)Visit(context.expression(i));
                if (i == 0)
                {
                    obj += temp.text;
                }
                else
                {
                    obj += ", " + temp.text;
                }
            }
            r.text = obj;
            r.data = "var";
            return(r);
        }
Beispiel #2
0
        public override object VisitExpressionList(ExpressionListContext context)
        {
            var r   = (new Result());
            var obj = "";

            foreach (var i in range(0, context.expression().Length - 1, 1, true, true))
            {
                var temp = (Result)(Visit(context.expression(i)));
                if (i == 0)
                {
                    obj += temp.text;
                }
                else
                {
                    obj += ", " + temp.text;
                }
            }
            r.text = obj;
            r.data = "var";
            return(r);
        }
Beispiel #3
0
        public override object VisitExpressionList(ExpressionListContext context)
        {
            var r   = (new Result());
            var obj = "";

            foreach (var(i, v) in context.expression().WithIndex())
            {
                var temp = ((Result)Visit(v));
                if (i == 0)
                {
                    obj += temp.text;
                }
                else
                {
                    obj += ", " + temp.text;
                }
            }
            r.text = obj;
            r.data = "var";
            return(r);
        }