-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
[Syntax] Parse 'switch' statement #15537
Conversation
@swift-ci Please smoke test |
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.
LGTM!
Child('Elements', kind='Syntax', | ||
node_choices=[ | ||
Child('Statements', kind='CodeBlockItemList'), | ||
Child('SwitchCases', kind='SwitchCaseList')]), |
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.
I wonder if there’s anything we could do to try to merge these
Child('Elements', kind='Syntax', | ||
node_choices=[ | ||
Child('Statements', kind='CodeBlockItemList'), | ||
Child('SwitchCases', kind='SwitchCaseList')]), |
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.
Dropping WithStatements
trait from IfConfigDecl
.
But separating IfConfigDecl
only for switch-cases (i.e. SwitchCaseIfConfig
) doesn't seem the right choice.
@swift-ci Please smoke test |
Can you also update |
62b8054
to
4488e99
Compare
@swift-ci Please smoke test |
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.
LGTM, thank you for clearing the statement section!
Ah, please make sure I remember to update this after #14382 goes in! |
Resolves #49466
CC: @nkcsgexi @harlanhaskins