We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a1ecf4a + e8190f9 commit 0e6e974Copy full SHA for 0e6e974
Sources/SwiftSyntaxMacros/MacroExpansionDiagnosticMessages.swift
@@ -68,3 +68,20 @@ public struct MacroExpansionFixItMessage: FixItMessage {
68
self.message = message
69
}
70
71
+
72
+/// The message of a note that is specified by a string literal
73
+///
74
+/// This type allows macro authors to quickly generate note messages based on
75
+/// a string. For any non-trivial note messages, it is encouraged to define a
76
+/// custom type that conforms to `NoteMessage`.
77
+public struct MacroExpansionNoteMessage: NoteMessage {
78
+ public var message: String
79
80
+ public var noteID: SwiftDiagnostics.MessageID {
81
+ .init(domain: diagnosticDomain, id: "\(Self.self)")
82
+ }
83
84
+ public init(_ message: String) {
85
+ self.message = message
86
87
+}
0 commit comments