public override Node VisitForILoop(TParser.ForILoopContext context) { var init = Visit(context.forLoopStart()); var condition = Visit(context.expression(0)); var update = Visit(context.expression(1)); var body = Visit(context.codeBlock()); return(new ForILoop(init, condition, update, body, context.Start)); }
/// <summary> /// Visit a parse tree produced by <see cref="TParser.forILoop"/>. /// <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 VisitForILoop([NotNull] TParser.ForILoopContext context) { return(VisitChildren(context)); }
/// <summary> /// Exit a parse tree produced by <see cref="TParser.forILoop"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitForILoop([NotNull] TParser.ForILoopContext context) { }