rename "unless" to "require" and give it an 'else' keyword.

Swift SVN r28059
This commit is contained in:
Chris Lattner
2015-05-02 00:16:44 +00:00
parent 5bc23acf75
commit 0011b3ae21
26 changed files with 121 additions and 109 deletions

View File

@@ -479,12 +479,12 @@ std::pair<bool, Stmt *> ModelASTWalker::walkToStmtPre(Stmt *S) {
}
pushStructureNode(SN, S);
} else if (auto *UnlessS = dyn_cast<UnlessStmt>(S)) {
} else if (auto *RS = dyn_cast<RequireStmt>(S)) {
SyntaxStructureNode SN;
SN.Kind = SyntaxStructureKind::UnlessStatement;
SN.Kind = SyntaxStructureKind::RequireStatement;
SN.Range = charSourceRangeFromSourceRange(SM, S->getSourceRange());
if (!UnlessS->getCond().empty()) {
auto Conds = UnlessS->getCond();
if (!RS->getCond().empty()) {
auto Conds = RS->getCond();
SourceRange ElemRange = SourceRange(Conds.front().getSourceRange().Start,
Conds.back().getSourceRange().End);
SN.Elements.emplace_back(SyntaxStructureElementKind::ConditionExpr,