[Syntax] Parse associatedtype declaration

Also, added generic where clause to typealias declaration.
This commit is contained in:
Rintaro Ishizaki
2018-02-05 18:25:17 +09:00
parent 62eb27110d
commit ba58a2994d
5 changed files with 51 additions and 6 deletions

View File

@@ -106,7 +106,7 @@ TEST(DeclSyntaxTests, TypealiasMakeAPIs) {
auto TypeInit = SyntaxFactory::makeTypeInitializerClause(Assignment,
Array_Int);
SyntaxFactory::makeTypealiasDecl(None, None, Typealias,
Subsequence, GenericParams, TypeInit)
Subsequence, GenericParams, TypeInit, None)
.print(OS);
ASSERT_EQ(OS.str().str(),
"typealias MyCollection<Element> = Array<Element>");