Skip to content

[SwiftSyntax] Add more types in protocol map #40358

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
Dec 6, 2021

Conversation

kimdv
Copy link
Contributor

@kimdv kimdv commented Dec 1, 2021

@kimdv kimdv changed the title Add more types in protocol map [SwiftSyntax] Add more types in protocol map Dec 1, 2021
@kimdv kimdv force-pushed the kimdv/add-more-types-in-protocol-map branch 2 times, most recently from 3ed66ba to 7305330 Compare December 5, 2021 08:33
@kimdv
Copy link
Contributor Author

kimdv commented Dec 5, 2021

swiftlang/swift-syntax#331

@swift-ci Please smoke test

@kimdv kimdv requested a review from ahoppen December 5, 2021 13:04
@kimdv kimdv force-pushed the kimdv/add-more-types-in-protocol-map branch from 7305330 to 030e129 Compare December 5, 2021 15:16
@kimdv
Copy link
Contributor Author

kimdv commented Dec 5, 2021

swiftlang/swift-syntax#331

@swift-ci Please smoke test

@@ -14,6 +20,15 @@
'MemberDeclList': [
'MemberDeclBlock'
],
'FunctionCallExpr': [
'CodeBlockItem',
Copy link
Member

Choose a reason for hiding this comment

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

For a future PR: Would it make sense to add automatically conformances like ExpressibleAsFunctionCallExpr : ExpressibleAsExpr (just like we have FunctionCallExpr : ExprBuildable and then add ExpressibleAsExpr : ExpressibleAsCodeBlockItem? That way, we wouldn’t need to add conformances to ExpressibleAsCodeBlockItem for every expression node.

The same thing I just showed for expression also applies to statements.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea!

@kimdv kimdv merged commit 9eda90f into swiftlang:main Dec 6, 2021
@kimdv kimdv deleted the kimdv/add-more-types-in-protocol-map branch December 6, 2021 09:18
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