Skip to content

Commit d3fdfef

Browse files
authored
Merge pull request #19337 from rudkx/swift-syntax-for-operator-designated-protocols
[Syntax] Update DeclNodes.py for designated protocols parsing support.
2 parents 7ae5a7a + cc7f2ba commit d3fdfef

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

utils/gyb_syntax_support/DeclNodes.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@
669669
is_optional=True),
670670
]),
671671

672-
# infix-operator-group -> ':' identifier
672+
# infix-operator-group -> ':' identifier ','? identifier?
673673
Node('InfixOperatorGroup', kind='Syntax',
674674
description='''
675675
A clause to specify precedence group in infix operator declaration.
@@ -680,6 +680,13 @@
680680
description='''
681681
The name of the precedence group for the operator
682682
'''),
683+
Child('TrailingComma', kind='CommaToken',
684+
is_optional=True),
685+
Child('ProtocolName', kind='IdentifierToken',
686+
description='''
687+
The protocol associated with the operator
688+
''',
689+
is_optional=True),
683690
]),
684691

685692
# precedence-group-decl -> attributes? modifiers? 'precedencegroup'

0 commit comments

Comments
 (0)