Skip to content

Commit b2e1dab

Browse files
authored
Merge pull request #59968 from CodaFi/primacy-and-recency
Remove Modeling for Fully-Generic Primary Associated Type Syntax
2 parents ca6f3c4 + e2bb54f commit b2e1dab

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

Diff for: unittests/Syntax/DeclSyntaxTests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ TEST(DeclSyntaxTests, ProtocolMakeAPIs) {
652652
auto MyCollection = Factory.makeIdentifier("MyCollection", "", "");
653653
auto ElementName = Factory.makeIdentifier("Element", "", "");
654654
auto ElementParam =
655-
Factory.makePrimaryAssociatedType(None, ElementName, None, None, None, None);
655+
Factory.makePrimaryAssociatedType(ElementName, None);
656656
auto LeftAngle = Factory.makeLeftAngleToken("", "");
657657
auto RightAngle = Factory.makeRightAngleToken("", " ");
658658
auto PrimaryAssocs = PrimaryAssociatedTypeClauseSyntaxBuilder(Arena)

Diff for: utils/gyb_syntax_support/GenericNodes.py

+1-10
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,11 @@
6767
Node('PrimaryAssociatedTypeList', kind='SyntaxCollection',
6868
element='PrimaryAssociatedType'),
6969

70-
# primary-associated-type -> type-name
71-
# | type-name (: type-identifier)? (= type)?
70+
# primary-associated-type -> type-name ','?
7271
Node('PrimaryAssociatedType', kind='Syntax',
7372
traits=['WithTrailingComma'],
7473
children=[
75-
Child('Attributes', kind='AttributeList',
76-
collection_element_name='Attribute', is_optional=True),
7774
Child('Name', kind='IdentifierToken'),
78-
Child('Colon', kind='ColonToken',
79-
is_optional=True),
80-
Child('InheritedType', kind='Type',
81-
is_optional=True),
82-
Child('Initializer', kind='TypeInitializerClause',
83-
is_optional=True),
8475
Child('TrailingComma', kind='CommaToken',
8576
is_optional=True),
8677
]),

0 commit comments

Comments
 (0)