Reinstate "[SR-511][Parse] Add 'associatedtype' keyword and fixit"

This reverts commit ce7b2bcf09, tweaking
a few validation tests appropriately (1 crasher fixed, two -verify
tests that needed updating).
This commit is contained in:
Doug Gregor
2016-01-13 23:13:34 -08:00
parent 657319903e
commit 38c1de69e4
76 changed files with 473 additions and 419 deletions

View File

@@ -115,6 +115,8 @@ static UIdent KindDeclExtensionStruct("source.lang.swift.decl.extension.struct")
static UIdent KindDeclExtensionClass("source.lang.swift.decl.extension.class");
static UIdent KindDeclExtensionEnum("source.lang.swift.decl.extension.enum");
static UIdent KindDeclExtensionProtocol("source.lang.swift.decl.extension.protocol");
static UIdent KindDeclAssociatedType("source.lang.swift.decl.associatedtype");
static UIdent KindRefAssociatedType("source.lang.swift.ref.associatedtype");
static UIdent KindDeclTypeAlias("source.lang.swift.decl.typealias");
static UIdent KindRefTypeAlias("source.lang.swift.ref.typealias");
static UIdent KindDeclGenericTypeParam("source.lang.swift.decl.generic_type_param");
@@ -163,7 +165,7 @@ public:
UIdent visitVarDecl(const VarDecl *D);
UIdent visitExtensionDecl(const ExtensionDecl *D);
UIdent visitAssociatedTypeDecl(const AssociatedTypeDecl *D) {
return IsRef ? KindRefTypeAlias : KindDeclTypeAlias;
return IsRef ? KindRefAssociatedType : KindDeclAssociatedType;
}
#define UID_FOR(CLASS) \
@@ -312,6 +314,7 @@ UIdent SwiftLangSupport::getUIDForCodeCompletionDeclKind(
case CodeCompletionDeclKind::Enum: return KindRefEnum;
case CodeCompletionDeclKind::EnumElement: return KindRefEnumElement;
case CodeCompletionDeclKind::Protocol: return KindRefProtocol;
case CodeCompletionDeclKind::AssociatedType: return KindRefAssociatedType;
case CodeCompletionDeclKind::TypeAlias: return KindRefTypeAlias;
case CodeCompletionDeclKind::GenericTypeParam: return KindRefGenericTypeParam;
case CodeCompletionDeclKind::Constructor: return KindRefConstructor;
@@ -337,6 +340,7 @@ UIdent SwiftLangSupport::getUIDForCodeCompletionDeclKind(
case CodeCompletionDeclKind::Enum: return KindDeclEnum;
case CodeCompletionDeclKind::EnumElement: return KindDeclEnumElement;
case CodeCompletionDeclKind::Protocol: return KindDeclProtocol;
case CodeCompletionDeclKind::AssociatedType: return KindDeclAssociatedType;
case CodeCompletionDeclKind::TypeAlias: return KindDeclTypeAlias;
case CodeCompletionDeclKind::GenericTypeParam: return KindDeclGenericTypeParam;
case CodeCompletionDeclKind::Constructor: return KindDeclConstructor;