mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Syntax] Add test case for unresolved matching patterns
Patterns those are parsed as ExpressionPattern at first, then resolved to actual patterns: * OptionalPattern -> pattern '?' * AsTypePattern -> pattern 'as' type * EnumCasePattern -> type? '.' identifier tuple-pattern
This commit is contained in:
@@ -28,10 +28,10 @@ PATTERN_NODES = [
|
||||
Child('Type', kind='Type'),
|
||||
]),
|
||||
|
||||
# optional-pattern -> identifier '?'
|
||||
# optional-pattern -> pattern '?'
|
||||
Node('OptionalPattern', kind='Pattern',
|
||||
children=[
|
||||
Child('Identifier', kind='IdentifierToken'),
|
||||
Child('SubPattern', kind='Pattern'),
|
||||
Child('QuestionMark', kind='PostfixQuestionMarkToken'),
|
||||
]),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user