Esempio n. 1
0
        /* repeat */
        public override Result VisitExpt_stblock_repeat([NotNull] STGrammerParser.Expt_stblock_repeatContext context)
        {
            string strRepeat = "DO\n";

            foreach (var e in context._blks)
            {
                string str = Visit(e).Info as string;
                strRepeat += str;
                strRepeat += "\n";
            }
            strRepeat += "UNTIL ";
            strRepeat += Visit(context.expr()).Info as string;

            return(new Result(true, strRepeat));
        }
Esempio n. 2
0
 /// <summary>
 /// Visit a parse tree produced by the <c>expt_stblock_repeat</c>
 /// labeled alternative in <see cref="STGrammerParser.statement_repeat"/>.
 /// <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 VisitExpt_stblock_repeat([NotNull] STGrammerParser.Expt_stblock_repeatContext context)
 {
     return(VisitChildren(context));
 }