Skip to content

[Parser] Add a contextual each keyword for pack references. #62509

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 2 commits into from
Dec 14, 2022

Conversation

hborla
Copy link
Member

@hborla hborla commented Dec 11, 2022

  • Add PackReferenceTypeRepr for pack references spelled with the each keyword.
  • Parse each as a contextual keyword applied to types.

For example:

protocol P {}

struct S<T...> where each T: P {}

For now, each is not required, but the idea is all pack references must be spelled with each, which can only appear inside pack expansions or generic requirements.

@hborla
Copy link
Member Author

hborla commented Dec 11, 2022

swiftlang/swift-syntax#1134

@swift-ci please smoke test

@hborla
Copy link
Member Author

hborla commented Dec 13, 2022

@swift-ci please smoke test

@hborla hborla merged commit 05443c4 into swiftlang:main Dec 14, 2022
@hborla hborla deleted the explicit-pack-reference-keyword branch December 14, 2022 00:44
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