Skip to content

Formalize Labeled Syntax #556

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

Merged
merged 1 commit into from
Aug 5, 2022
Merged

Formalize Labeled Syntax #556

merged 1 commit into from
Aug 5, 2022

Conversation

CodaFi
Copy link
Contributor

@CodaFi CodaFi commented Aug 4, 2022

This represents labeled statements as an explicit kind of statement and removes the Labeled trait. Any kind of statement is allowed to be labeled in the tree, but we specifically diagnose the syntax elements that aren't allowed to have labels. This homogenizes the way clients deal with statement labels and also makes parser recovery quite a bit easier in the case where we have a label but no actual statement following it.

@CodaFi
Copy link
Contributor Author

CodaFi commented Aug 4, 2022

swiftlang/swift#60396

@swift-ci please test

1 similar comment
@CodaFi
Copy link
Contributor Author

CodaFi commented Aug 5, 2022

swiftlang/swift#60396

@swift-ci please test

@CodaFi CodaFi force-pushed the label-maker branch 3 times, most recently from 3977ed8 to 9dba755 Compare August 5, 2022 19:18
@CodaFi
Copy link
Contributor Author

CodaFi commented Aug 5, 2022

swiftlang/swift#60396

@swift-ci please test

@CodaFi
Copy link
Contributor Author

CodaFi commented Aug 5, 2022

swiftlang/swift#60396

@swift-ci please test macOS

@CodaFi
Copy link
Contributor Author

CodaFi commented Aug 5, 2022

swiftlang/swift#60396

@swift-ci please test Linux

@CodaFi
Copy link
Contributor Author

CodaFi commented Aug 5, 2022

swiftlang/swift#60396

@swift-ci please test

This represents labeled statements as an explicit kind of statement and removes the Labeled trait. Any kind of statement is allowed to be labeled in the tree, but we specifically diagnose the syntax elements that aren't allowed to have labels. This homogenizes the way clients deal with statement labels and also makes parser recovery quite a bit easier in the case where we have a label but no actual statement following it.
@CodaFi
Copy link
Contributor Author

CodaFi commented Aug 5, 2022

swiftlang/swift#60396

@swift-ci please test

@CodaFi CodaFi merged commit 0805792 into swiftlang:main Aug 5, 2022
@CodaFi CodaFi deleted the label-maker branch August 15, 2022 16:19
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.

1 participant