8000 Add an introducer property to DeclGroupSyntax by bnbarham · Pull Request #2539 · swiftlang/swift-syntax · GitHub
[go: up one dir, main page]

Skip to content

Add an introducer property to DeclGroupSyntax #2539

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
Mar 13, 2024

Conversation

bnbarham
Copy link
Contributor

It can be useful to grab the introducer of a particular declaration, add a property for this purpose to DeclGroupSyntax.

Fixes #2535.
Resolves rdar://124247480.

@bnbarham bnbarham requested a review from ahoppen as a code owner March 12, 2024 00:27
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@@ -72,6 +72,22 @@ public protocol DeclGroupSyntax: SyntaxProtocol, DeclSyntaxProtocol {
set
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also open to renaming DeclGroupSyntax if anyone has a better name for it.

Copy link
Member

Choose a reason for hiding this comment

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

I’m not a huge fan of my suggestion but what this conceptually is, is a DeclWithMembersSyntax, I think. At least that describes the trait IMO.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That matches the other "With" at least 😅

@bnbarham bnbarham requested a review from ktoso March 12, 2024 00:30
Copy link
Contributor
@ktoso ktoso left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

@@ -72,6 +72,22 @@ public protocol DeclGroupSyntax: SyntaxProtocol, DeclSyntaxProtocol {
set
}

Copy link
Member

Choose a reason for hiding this comment

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

I’m not a huge fan of my suggestion but what this conceptually is, is a DeclWithMembersSyntax, I think. At least that describes the trait IMO.

@bnbarham bnbarham force-pushed the add-introducer branch 2 times, most recently from 9722a71 to 88f7302 Compare March 12, 2024 20:49
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@ahoppen
Copy link
Member
ahoppen commented Mar 12, 2024

@swift-ci Please test Windows

It can be useful to grab the introducer of a particular declaration, add
a property for this purpose to `DeclGroupSyntax`.

Fixes swiftlang#2535.
Resolves rdar://124247480.
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham bnbarham merged commit 6ea8d50 into swiftlang:main Mar 13, 2024
@bnbarham bnbarham deleted the add-introducer branch March 13, 2024 20:25
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.

DeclGroupSyntax should have introducerKeyword
3 participants
0