Skip to content
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

Merged
merged 1 commit into from Mar 27, 2018
Merged

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Mar 27, 2018

@rintaro
Copy link
Member Author

rintaro commented Mar 27, 2018

@swift-ci Please smoke test

Copy link
Collaborator

@harlanhaskins harlanhaskins left a 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')]),
Copy link
Collaborator

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')]),
Copy link
Member Author

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.

@rintaro
Copy link
Member Author

rintaro commented Mar 27, 2018

@swift-ci Please smoke test

@harlanhaskins
Copy link
Collaborator

Can you also update lib/Syntax/Status.md?

@rintaro
Copy link
Member Author

rintaro commented Mar 27, 2018

@swift-ci Please smoke test

Copy link
Member

@nkcsgexi nkcsgexi left a 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!

@jrose-apple
Copy link
Contributor

Ah, please make sure I remember to update this after #14382 goes in!

@nkcsgexi nkcsgexi merged commit d496d5b into apple:master Mar 27, 2018
@rintaro rintaro deleted the syntax-parse-switch branch April 3, 2018 08:52
@rintaro rintaro mannequin mentioned this pull request Apr 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants