mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
Adjustment because trimmedRange is not available in swift-syntax release/6.0
This commit is contained in:
@@ -110,7 +110,10 @@ public struct ConvertJSONToCodableStruct: EditRefactoringProvider {
|
||||
// Closures are replaced entirely, since they were invalid code to
|
||||
// start with.
|
||||
return [
|
||||
SourceEdit(range: closure.trimmedRange, replacement: decls.description)
|
||||
SourceEdit(
|
||||
range: closure.positionAfterSkippingLeadingTrivia..<closure.endPositionBeforeTrailingTrivia,
|
||||
replacement: decls.description
|
||||
)
|
||||
]
|
||||
case .endingClosure(let closure, let unexpected):
|
||||
// Closures are replaced entirely, since they were invalid code to
|
||||
|
||||
Reference in New Issue
Block a user