-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[ASTGen] Implement Patterns #70387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ASTGen] Implement Patterns #70387
Conversation
@swift-ci Please smoke test |
} | ||
|
||
func generate(tuplePattern node: TuplePatternSyntax) -> BridgedPattern { | ||
if node.elements.count == 1 && node.elements.first!.label == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if node.elements.count == 1 && node.elements.first!.label == nil { | |
if node.elements.count == 1, let firstElement = node.elements.first, firstElement.label == nil { |
And then firstElement
can be re-used further down (firstElement.pattern
).
BridgedIdentifier Label; | ||
BridgedSourceLoc LabelLoc; | ||
BridgedPattern ThePattern; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lowercase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are inconsistent. Let's clean them up later.
Except `MissingPatternSyntax`
4530eef
to
eb46b6f
Compare
@swift-ci Please smoke test |
@swift-ci Please smoke test Linux |
1 similar comment
@swift-ci Please smoke test Linux |
Expect
MissingPatternSyntax
.