@@ -16,8 +16,8 @@ private func replaceFirstLabel(
16
16
}
17
17
18
18
public struct ColorLiteralMacro : ExpressionMacro {
19
- public static func expand (
20
- _ macro: MacroExpansionExprSyntax , in context: inout MacroExpansionContext
19
+ public static func expansion (
20
+ of macro: MacroExpansionExprSyntax , in context: inout MacroExpansionContext
21
21
) -> ExprSyntax {
22
22
let argList = replaceFirstLabel (
23
23
of: macro. argumentList, with: " _colorLiteralRed "
@@ -31,8 +31,8 @@ public struct ColorLiteralMacro: ExpressionMacro {
31
31
}
32
32
33
33
public struct FileIDMacro : ExpressionMacro {
34
- public static func expand (
35
- _ macro: MacroExpansionExprSyntax , in context: inout MacroExpansionContext
34
+ public static func expansion (
35
+ of macro: MacroExpansionExprSyntax , in context: inout MacroExpansionContext
36
36
) -> ExprSyntax {
37
37
let fileLiteral : ExprSyntax = #"" \#( context. moduleName) / \#( context. fileName) ""#
38
38
if let leadingTrivia = macro. leadingTrivia {
@@ -43,8 +43,8 @@ public struct FileIDMacro: ExpressionMacro {
43
43
}
44
44
45
45
public struct StringifyMacro : ExpressionMacro {
46
- public static func expand (
47
- _ macro: MacroExpansionExprSyntax , in context: inout MacroExpansionContext
46
+ public static func expansion (
47
+ of macro: MacroExpansionExprSyntax , in context: inout MacroExpansionContext
48
48
) -> ExprSyntax {
49
49
guard let argument = macro. argumentList. first? . expression else {
50
50
// FIXME: Create a diagnostic for the missing argument?
0 commit comments