Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #3
0
 /// <summary>
 /// Exit a parse tree produced by <see cref="SLangGrammarParser.exprList"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitExprList([NotNull] SLangGrammarParser.ExprListContext context)
 {
 }
 /// <summary>
 /// Visit a parse tree produced by <see cref="SLangGrammarParser.exprList"/>.
 /// <para>
 /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/>
 /// on <paramref name="context"/>.
 /// </para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 /// <return>The visitor result.</return>
 public virtual Result VisitExprList([NotNull] SLangGrammarParser.ExprListContext context)
 {
     return(VisitChildren(context));
 }