switch 'convenience' from being a specially handles contextual keyword

to being a decl modifier just like the rest, this elimiantes a bunch of
special case code for handling it.


Swift SVN r20101
This commit is contained in:
Chris Lattner
2014-07-17 17:08:32 +00:00
parent b2220fc503
commit 9b0d88e800
11 changed files with 18 additions and 57 deletions

View File

@@ -396,15 +396,6 @@ bool ModelASTWalker::walkToDeclPre(Decl *D) {
return false;
if (auto *AFD = dyn_cast<AbstractFunctionDecl>(D)) {
if (auto CtorD = dyn_cast<ConstructorDecl>(D)) {
SourceLoc ConvenienceLoc = CtorD->getConvenienceLoc();
if (ConvenienceLoc.isValid())
if (!passNonTokenNode({ SyntaxNodeKind::Keyword,
CharSourceRange(ConvenienceLoc,
strlen("convenience"))}))
return false;
}
FuncDecl *FD = dyn_cast<FuncDecl>(AFD);
if (FD && FD->isAccessor()) {
// Pass context sensitive keyword token.