Skip to content

Remove deprecated methods #1210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,6 @@ let syntaxVisitorFile = SourceFileSyntax {
try! ClassDeclSyntax("open class SyntaxVisitor") {
DeclSyntax("public let viewMode: SyntaxTreeViewMode")

DeclSyntax(
"""
@available(*, deprecated, message: "Use init(viewMode:) instead")
public convenience init() {
self.init(viewMode: .sourceAccurate)
}
"""
)

DeclSyntax(
"""
public init(viewMode: SyntaxTreeViewMode) {
Expand Down
1 change: 0 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ let package = Package(
"CMakeLists.txt",
"Raw/RawSyntaxNodes.swift.gyb",
"Raw/RawSyntaxValidation.swift.gyb",
"SyntaxFactory.swift.gyb",
"SyntaxNodes.swift.gyb.template",
],
swiftSettings: swiftSyntaxSwiftSettings
Expand Down
1 change: 0 additions & 1 deletion Sources/SwiftSyntax/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ add_swift_host_library(SwiftSyntax
generated/SyntaxBaseNodes.swift
generated/SyntaxCollections.swift
generated/SyntaxEnum.swift
gyb_generated/SyntaxFactory.swift
generated/SyntaxKind.swift
generated/SyntaxRewriter.swift
generated/SyntaxTraits.swift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ allows Swift tools to parse, inspect, generate, and transform Swift source code.
- <doc:SwiftSyntax/SyntaxProtocol>
- <doc:SwiftSyntax/SyntaxArena>
- <doc:SwiftSyntax/SyntaxEnum>
- <doc:SwiftSyntax/SyntaxFactory>
- <doc:SwiftSyntax/SyntaxHashable>
- <doc:SwiftSyntax/SyntaxIdentifier>
- <doc:SwiftSyntax/RawTokenKind>
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@ allows Swift tools to parse, inspect, generate, and transform Swift source code.
- <doc:SwiftSyntax/SyntaxProtocol>
- <doc:SwiftSyntax/SyntaxArena>
- <doc:SwiftSyntax/SyntaxEnum>
- <doc:SwiftSyntax/SyntaxFactory>
- <doc:SwiftSyntax/SyntaxHashable>
- <doc:SwiftSyntax/SyntaxIdentifier>
- <doc:SwiftSyntax/RawTokenKind>
22 changes: 0 additions & 22 deletions Sources/SwiftSyntax/IncrementalParseTransition.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,28 +49,6 @@ public final class IncrementalParseTransition {
fileprivate let edits: ConcurrentEdits
fileprivate let reusedDelegate: IncrementalParseReusedNodeDelegate?

/// - Parameters:
/// - previousTree: The previous tree to do lookups on.
/// - edits: The edits that have occurred since the last parse that resulted
/// in the new source that is about to be parsed. There is a strict
/// requirement for the array of edits to:
/// 1. not be overlapping.
/// 2. should be in increasing source offset order.
/// - reusedNodeDelegate: Optional delegate to accept information about the
/// reused regions and nodes.
@available(*, deprecated, message: "Use the initializer taking 'ConcurrentEdits' instead")
public convenience init(
previousTree: SourceFileSyntax,
edits: [SourceEdit],
reusedNodeDelegate: IncrementalParseReusedNodeDelegate? = nil
) {
self.init(
previousTree: previousTree,
edits: try! ConcurrentEdits(concurrent: edits),
reusedNodeDelegate: reusedNodeDelegate
)
}

/// - Parameters:
/// - previousTree: The previous tree to do lookups on.
/// - edits: The edits that have occurred since the last parse that resulted
Expand Down
11 changes: 0 additions & 11 deletions Sources/SwiftSyntax/Syntax.swift
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,6 @@ extension SyntaxProtocol {
}

public extension SyntaxProtocol {
@available(*, deprecated, message: "Use children(viewMode:) instead")
var children: SyntaxChildren {
return children(viewMode: .sourceAccurate)
}

/// A sequence over the `present` children of this node.
func children(viewMode: SyntaxTreeViewMode) -> SyntaxChildren {
return SyntaxChildren(_syntaxNode, viewMode: viewMode)
Expand Down Expand Up @@ -523,12 +518,6 @@ public extension SyntaxProtocol {
return this
}

/// Sequence of tokens that are part of this Syntax node.
@available(*, deprecated, message: "Use tokens(viewMode:) instead")
var tokens: TokenSequence {
return tokens(viewMode: .sourceAccurate)
}

/// Sequence of tokens that are part of this Syntax node.
func tokens(viewMode: SyntaxTreeViewMode) -> TokenSequence {
return TokenSequence(_syntaxNode, viewMode: viewMode)
Expand Down
267 changes: 0 additions & 267 deletions Sources/SwiftSyntax/SyntaxFactory.swift.gyb

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/SwiftSyntax/generated/SyntaxVisitor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ public enum SyntaxVisitorContinueKind {
open class SyntaxVisitor {
public let viewMode: SyntaxTreeViewMode

@available(*, deprecated, message: "Use init(viewMode:) instead")
public convenience init() {
self.init(viewMode: .sourceAccurate)
}

public init(viewMode: SyntaxTreeViewMode) {
self.viewMode = viewMode
}
Expand Down
Loading