Skip to content

Commit 85651d5

Browse files
committed
[Variadic Generics] Add a new type node for pack references spelled with 'each'.
1 parent eb117dc commit 85651d5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

gyb_syntax_support/TypeNodes.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,14 @@
123123
Child('Ellipsis', kind='EllipsisToken')
124124
]),
125125

126+
# pack-reference-type -> 'each' type
127+
Node('PackReferenceType', name_for_diagnostics='pack reference', kind='Type',
128+
children=[
129+
Child('EachKeyword', kind='ContextualKeyworkToken',
130+
text_choices=['each'], is_optional=False),
131+
Child('PackType', kind='Type')
132+
]),
133+
126134
# tuple-type-element -> identifier? ':'? type-annotation ','?
127135
Node('TupleTypeElement', name_for_diagnostics=None, kind='Syntax',
128136
traits=['WithTrailingComma'],

0 commit comments

Comments
 (0)