Ejemplo n.º 1
0
        public override object VisitExprList([NotNull] SLangGrammarParser.ExprListContext context)
        {
            var expressionResults = new List <ExpressionResult>();

            foreach (var expr in context.exp())
            {
                expressionResults.Add(Visit(expr) as ExpressionResult);
            }
            return(expressionResults);
        }
Ejemplo n.º 2
0
        public override object VisitExprList([NotNull] SLangGrammarParser.ExprListContext context)
        {
            var expList = context.exp();
            int n       = expList.Length;

            for (int i = 0; i < n; ++i)
            {
                Visit(expList[i]);
                if (i != n - 1)
                {
                    cppText.Write(", ");
                }
            }
            return(null);
        }