File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
lib/ASTGen/Sources/ASTGen Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,12 @@ fileprivate func emitDiagnosticParts(
7575 replaceEndLoc = bridgedSourceLoc ( at: oldToken. endPosition)
7676 newText = newTrivia. description
7777
78+ case . replaceChild( let replacingChildData) :
79+ let replacementRange = replacingChildData. replacementRange
80+ replaceStartLoc = bridgedSourceLoc ( at: replacementRange. lowerBound)
81+ replaceEndLoc = bridgedSourceLoc ( at: replacementRange. upperBound)
82+ newText = replacingChildData. newChild. description
83+
7884#if RESILIENT_SWIFT_SYNTAX
7985 @unknown default :
8086 fatalError ( )
@@ -221,6 +227,18 @@ extension SourceManager {
221227 )
222228 newText = newTrivia. description
223229
230+ case . replaceChild( let replacingChildData) :
231+ let replacementRange = replacingChildData. replacementRange
232+ replaceStartLoc = bridgedSourceLoc (
233+ for: replacingChildData. parent,
234+ at: replacementRange. lowerBound
235+ )
236+ replaceEndLoc = bridgedSourceLoc (
237+ for: replacingChildData. parent,
238+ at: replacementRange. upperBound
239+ )
240+ newText = replacingChildData. newChild. description
241+
224242#if RESILIENT_SWIFT_SYNTAX
225243 @unknown default :
226244 fatalError ( )
You can’t perform that action at this time.
0 commit comments