Skip to content

Commit 11817a3

Browse files
committed
wip
1 parent 972875f commit 11817a3

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

Package.resolved

Lines changed: 8 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/MacroTesting/AssertMacro.swift

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,23 @@ extension FixIt.Change {
470470
range: start..<end,
471471
replacement: newTrivia.description
472472
)
473+
474+
#if canImport(SwiftSyntax601)
475+
case .replaceChild(let data):
476+
let range = replacingChildData.replacementRange
477+
let start = expansionContext.position(
478+
of: range.lowerBound,
479+
anchoredAt: replacingChildData.parent
480+
)
481+
let end = expansionContext.position(
482+
of: range.upperBound,
483+
anchoredAt: replacingChildData.parent
484+
)
485+
return SourceEdit(
486+
range: start..<end,
487+
replacement: replacingChildData.newChild.description
488+
)
489+
#endif
473490
}
474491
}
475492
}

0 commit comments

Comments
 (0)