Change do-while to repeat-while.

Change all uses of "do { ... } while <cond>" to use "repeat" instead.
Rename DoWhileStmt to RepeatWhileStmt. Add diagnostic suggesting change
of 'do' to 'repeat' if a condition is found afterwards.

<rdar://problem/20336424> rename do/while loops to repeat/while & introduce "repeat <count> {}" loops

Swift SVN r27650
This commit is contained in:
Chris Willmore
2015-04-23 22:48:31 +00:00
parent ab66ffabf7
commit c7c7388cf2
40 changed files with 177 additions and 111 deletions

View File

@@ -1160,6 +1160,7 @@ public:
ParserResult<Stmt> parseStmtIfConfig(BraceItemListKind Kind
= BraceItemListKind::Brace);
ParserResult<Stmt> parseStmtWhile(LabeledStmtInfo LabelInfo);
ParserResult<Stmt> parseStmtRepeat(LabeledStmtInfo LabelInfo);
ParserResult<Stmt> parseStmtDo(LabeledStmtInfo LabelInfo);
ParserResult<CatchStmt> parseStmtCatch();
ParserResult<Stmt> parseStmtFor(LabeledStmtInfo LabelInfo);