private static void WriteDoWhileStatement(BoundDoWhileStatement node, IndentedTextWriter writer) { writer.WriteKeyword(SyntaxKind.DoKeyword); writer.WriteLine(); writer.WriteNestedStatement(node.Body); writer.WriteKeyword(SyntaxKind.WhileKeyword); writer.WriteWhiteSpace(); node.Condition.WriteTo(writer); writer.WriteLine(); }
protected virtual BoundStatement RewriteDoWhileStatement(BoundDoWhileStatement node) { BoundExpression condition = RewriteExpression(node.Condition); BoundStatement body = RewriteStatement(node.Body); if (body == node.Body && condition == node.Condition) { return(node); } return(new BoundWhileStatement(condition, body, node.BreakLabel, node.ContinueLabel)); }