Skip to content

Commit 0e60fd1

Browse files
committed
Remove deprecated methods
Now that we have branched for Swift 5.8, we can remove all deprecated methods on main.
1 parent 03f748b commit 0e60fd1

File tree

9 files changed

+0
-9552
lines changed

9 files changed

+0
-9552
lines changed

CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxVisitorFile.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@ let syntaxVisitorFile = SourceFileSyntax {
3030
try! ClassDeclSyntax("open class SyntaxVisitor") {
3131
DeclSyntax("public let viewMode: SyntaxTreeViewMode")
3232

33-
DeclSyntax("""
34-
@available(*, deprecated, message: "Use init(viewMode:) instead")
35-
public convenience init() {
36-
self.init(viewMode: .sourceAccurate)
37-
}
38-
""")
39-
4033
DeclSyntax("""
4134
public init(viewMode: SyntaxTreeViewMode) {
4235
self.viewMode = viewMode

Sources/SwiftSyntax/IncrementalParseTransition.swift

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -49,28 +49,6 @@ public final class IncrementalParseTransition {
4949
fileprivate let edits: ConcurrentEdits
5050
fileprivate let reusedDelegate: IncrementalParseReusedNodeDelegate?
5151

52-
/// - Parameters:
53-
/// - previousTree: The previous tree to do lookups on.
54-
/// - edits: The edits that have occurred since the last parse that resulted
55-
/// in the new source that is about to be parsed. There is a strict
56-
/// requirement for the array of edits to:
57-
/// 1. not be overlapping.
58-
/// 2. should be in increasing source offset order.
59-
/// - reusedNodeDelegate: Optional delegate to accept information about the
60-
/// reused regions and nodes.
61-
@available(*, deprecated, message: "Use the initializer taking 'ConcurrentEdits' instead")
62-
public convenience init(
63-
previousTree: SourceFileSyntax,
64-
edits: [SourceEdit],
65-
reusedNodeDelegate: IncrementalParseReusedNodeDelegate? = nil
66-
) {
67-
self.init(
68-
previousTree: previousTree,
69-
edits: try! ConcurrentEdits(concurrent: edits),
70-
reusedNodeDelegate: reusedNodeDelegate
71-
)
72-
}
73-
7452
/// - Parameters:
7553
/// - previousTree: The previous tree to do lookups on.
7654
/// - edits: The edits that have occurred since the last parse that resulted

Sources/SwiftSyntax/Syntax.swift

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,6 @@ extension SyntaxProtocol {
255255
}
256256

257257
public extension SyntaxProtocol {
258-
@available(*, deprecated, message: "Use children(viewMode:) instead")
259-
var children: SyntaxChildren {
260-
return children(viewMode: .sourceAccurate)
261-
}
262-
263258
/// A sequence over the `present` children of this node.
264259
func children(viewMode: SyntaxTreeViewMode) -> SyntaxChildren {
265260
return SyntaxChildren(_syntaxNode, viewMode: viewMode)
@@ -523,12 +518,6 @@ public extension SyntaxProtocol {
523518
return this
524519
}
525520

526-
/// Sequence of tokens that are part of this Syntax node.
527-
@available(*, deprecated, message: "Use tokens(viewMode:) instead")
528-
var tokens: TokenSequence {
529-
return tokens(viewMode: .sourceAccurate)
530-
}
531-
532521
/// Sequence of tokens that are part of this Syntax node.
533522
func tokens(viewMode: SyntaxTreeViewMode) -> TokenSequence {
534523
return TokenSequence(_syntaxNode, viewMode: viewMode)

Sources/SwiftSyntax/SyntaxFactory.swift.gyb

Lines changed: 0 additions & 267 deletions
This file was deleted.

Sources/SwiftSyntax/generated/SyntaxVisitor.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ public enum SyntaxVisitorContinueKind {
1313
open class SyntaxVisitor {
1414
public let viewMode: SyntaxTreeViewMode
1515

16-
@available(*, deprecated, message: "Use init(viewMode:) instead")
17-
public convenience init() {
18-
self.init(viewMode: .sourceAccurate)
19-
}
20-
2116
public init(viewMode: SyntaxTreeViewMode) {
2217
self.viewMode = viewMode
2318
}

0 commit comments

Comments
 (0)