@@ -36,7 +36,7 @@ public struct FileIDMacro: ExpressionMacro {
36
36
public static func expansion(
37
37
of macro: MacroExpansionExprSyntax , in context: inout MacroExpansionContext
38
38
) -> ExprSyntax {
39
- let fileLiteral : ExprSyntax = #"" \#( context. moduleName) / \#( context. fileName) ""#
39
+ let fileLiteral : ExprSyntax = #"" \#( raw : context. moduleName) / \#( raw : context. fileName) ""#
40
40
if let leadingTrivia = macro. leadingTrivia {
41
41
return fileLiteral. withLeadingTrivia ( leadingTrivia)
42
42
}
@@ -82,9 +82,9 @@ public enum AddBlocker: ExpressionMacro {
82
82
}
83
83
84
84
// Link the folded argument back into the tree.
85
- var node = node. withArgumentList ( node. argumentList. replacing ( childAt: 0 , with: node. argumentList. first!. withExpression ( foldedArgument. as ( ExprSyntax . self) !) ) )
85
+ let node = node. withArgumentList ( node. argumentList. replacing ( childAt: 0 , with: node. argumentList. first!. withExpression ( foldedArgument. as ( ExprSyntax . self) !) ) )
86
86
87
- class AddVisitor : SyntaxRewriter {
87
+ class AddVisitor : SyntaxRewriter {
88
88
var diagnostics : [ Diagnostic ] = [ ]
89
89
90
90
override func visit(
@@ -117,7 +117,7 @@ public enum AddBlocker: ExpressionMacro {
117
117
oldNode: Syntax ( binOp. operatorToken. withoutTrivia ( ) ) ,
118
118
newNode: Syntax (
119
119
TokenSyntax (
120
- . spacedBinaryOperator ( " - " ) ,
120
+ . binaryOperator ( " - " ) ,
121
121
presence: . present
122
122
)
123
123
)
@@ -132,7 +132,7 @@ public enum AddBlocker: ExpressionMacro {
132
132
node. withOperatorOperand (
133
133
ExprSyntax (
134
134
binOp. withOperatorToken (
135
- binOp. operatorToken. withKind ( . spacedBinaryOperator ( " - " ) )
135
+ binOp. operatorToken. withKind ( . binaryOperator ( " - " ) )
136
136
)
137
137
)
138
138
)
0 commit comments