public int VisitPostTestLoop(CodePostTestLoopStatement loop) { writer.Write("do"); WriteStatements(loop.Body); writer.Write(" "); writer.Write("while"); writer.Write(" ("); loop.Test !.Accept(expWriter); writer.Write(");"); TerminateLine(); return(0); }
public CodePostTestLoopStatement DoWhile( Action generateBody, CodeExpression exp) { var dw = new CodePostTestLoopStatement { Test = exp, }; Scope.Add(dw); var oldScope = Scope; Scope = dw.Body; generateBody(); Scope = oldScope; return(dw); }