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(
75
75
replaceEndLoc = bridgedSourceLoc ( at: oldToken. endPosition)
76
76
newText = newTrivia. description
77
77
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
+
78
84
#if RESILIENT_SWIFT_SYNTAX
79
85
@unknown default :
80
86
fatalError ( )
@@ -221,6 +227,18 @@ extension SourceManager {
221
227
)
222
228
newText = newTrivia. description
223
229
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
+
224
242
#if RESILIENT_SWIFT_SYNTAX
225
243
@unknown default :
226
244
fatalError ( )
You can’t perform that action at this time.
0 commit comments