Skip to content

[NFC] Add parsing helpers for @attr(<identifier>) #61378

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
Oct 3, 2022

Conversation

beccadax
Copy link
Contributor

Extends the existing parseSingleAttrOption() helper to also be able to parse a single arbitrary Identifier. This simplifies the handling of SwiftNativeObjCRuntimeBaseAttr, ObjCRuntimeNameAttr, and ProjectedValuePropertyAttr.

Extracted from #60630.

@beccadax
Copy link
Contributor Author

@swift-ci please smoke test

@beccadax beccadax requested a review from rintaro September 30, 2022 00:45
Refactors `parseSingleAttrOption()` to create a helper that can parse a single arbitrary `Identifier`. This simplifies the handling of `SwiftNativeObjCRuntimeBaseAttr`, `ObjCRuntimeNameAttr`, and `ProjectedValuePropertyAttr`.
@beccadax beccadax force-pushed the an-argument-about-attribution branch from 12128ca to acb997b Compare October 2, 2022 21:49
@beccadax beccadax requested a review from rintaro October 2, 2022 21:49
@beccadax
Copy link
Contributor Author

beccadax commented Oct 2, 2022

@rintaro Here's a different design for both helpers that you might be a little happier with.

@beccadax
Copy link
Contributor Author

beccadax commented Oct 2, 2022

@swift-ci please smoke test

Copy link
Member

@rintaro rintaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this! Thank you!

@beccadax beccadax force-pushed the an-argument-about-attribution branch from acb997b to 0cd4a39 Compare October 2, 2022 22:09
@beccadax
Copy link
Contributor Author

beccadax commented Oct 2, 2022

@swift-ci please smoke test

@beccadax beccadax merged commit 3f02037 into swiftlang:main Oct 3, 2022
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.

2 participants