Skip to content

Commit ceb1152

Browse files
committed
Add support for FixIt.Change.textualReplacement
1 parent a5df17e commit ceb1152

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/ASTGen/Sources/MacroEvaluation/SourceManager.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,17 @@ extension SourceManager {
216216
at: replacementRange.upperBound
217217
)
218218
newText = replacingChildData.newChild.description
219+
220+
case .textualReplacement(replacementRange: let replacementRange, sourceFile: let sourceFile, newText: let replacementText):
221+
replaceStartLoc = bridgedSourceLoc(
222+
for: sourceFile,
223+
at: replacementRange.lowerBound
224+
)
225+
replaceEndLoc = bridgedSourceLoc(
226+
for: sourceFile,
227+
at: replacementRange.upperBound
228+
)
229+
newText = replacementText
219230
}
220231

221232
newText.withBridgedString { bridgedMessage in

0 commit comments

Comments
 (0)