Skip to content

[Macros] Pass macro role for freestanding macro expansion #1757

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 3 commits into from
Jun 10, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Prune unused macro expansion error case
  • Loading branch information
DougGregor committed Jun 9, 2023
commit a992586c50fcfba019c446d628195a8ca5549721
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import SwiftSyntax
/// Errors in macro handing.
enum MacroExpansionError {
case macroTypeNotFound(PluginMessage.MacroReference)
case unmatchedMacroRole
case freestandingMacroSyntaxIsNotMacro
case invalidExpansionMessage
case invalidMacroRole(PluginMessage.MacroRole)
Expand All @@ -28,9 +27,6 @@ extension MacroExpansionError: DiagnosticMessage {
case .macroTypeNotFound(let ref):
return "macro type '\(ref.moduleName).\(ref.typeName)' not found when expanding macro '\(ref.name)'"

case .unmatchedMacroRole:
return "macro doesn't conform to required macro role"

case .freestandingMacroSyntaxIsNotMacro:
return "macro syntax couldn't be parsed"

Expand Down