Skip to content

Commit

Permalink
Remove unused nodes
Browse files Browse the repository at this point in the history
These nodes will be removed from SwiftSyntax and thus also shouldn’t be used by swift-format.
  • Loading branch information
ahoppen committed Jan 3, 2023
1 parent a1ebffe commit fcbe608
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions Sources/SwiftFormatPrettyPrint/TokenStreamCreator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1428,10 +1428,6 @@ fileprivate final class TokenStreamCreator: SyntaxVisitor {
return .visitChildren
}

override func visit(_ node: AccessLevelModifierSyntax) -> SyntaxVisitorContinueKind {
return .visitChildren
}

override func visit(_ node: CodeBlockSyntax) -> SyntaxVisitorContinueKind {
return .visitChildren
}
Expand Down Expand Up @@ -1969,10 +1965,6 @@ fileprivate final class TokenStreamCreator: SyntaxVisitor {
return .visitChildren
}

override func visit(_ node: AsTypePatternSyntax) -> SyntaxVisitorContinueKind {
return .visitChildren
}

override func visit(_ node: InheritedTypeSyntax) -> SyntaxVisitorContinueKind {
after(node.trailingComma, tokens: .break(.same))
return .visitChildren
Expand Down Expand Up @@ -2009,10 +2001,6 @@ fileprivate final class TokenStreamCreator: SyntaxVisitor {
return .visitChildren
}

override func visit(_ node: ExpressionStmtSyntax) -> SyntaxVisitorContinueKind {
return .visitChildren
}

override func visit(_ node: IdentifierExprSyntax) -> SyntaxVisitorContinueKind {
return .visitChildren
}
Expand Down Expand Up @@ -2040,14 +2028,6 @@ fileprivate final class TokenStreamCreator: SyntaxVisitor {
return .visitChildren
}

override func visit(_ node: DeclarationStmtSyntax) -> SyntaxVisitorContinueKind {
return .visitChildren
}

override func visit(_ node: EnumCasePatternSyntax) -> SyntaxVisitorContinueKind {
return .visitChildren
}

override func visit(_ node: FallthroughStmtSyntax) -> SyntaxVisitorContinueKind {
return .visitChildren
}
Expand All @@ -2066,10 +2046,6 @@ fileprivate final class TokenStreamCreator: SyntaxVisitor {
return .visitChildren
}

override func visit(_ node: OptionalPatternSyntax) -> SyntaxVisitorContinueKind {
return .visitChildren
}

override func visit(_ node: WildcardPatternSyntax) -> SyntaxVisitorContinueKind {
return .visitChildren
}
Expand Down Expand Up @@ -2249,10 +2225,6 @@ fileprivate final class TokenStreamCreator: SyntaxVisitor {
return .visitChildren
}

override func visit(_ node: SymbolicReferenceExprSyntax) -> SyntaxVisitorContinueKind {
return .visitChildren
}

override func visit(_ node: TypeInheritanceClauseSyntax) -> SyntaxVisitorContinueKind {
// Normally, the open-break is placed before the open token. In this case, it's intentionally
// ordered differently so that the inheritance list can start on the current line and only
Expand Down Expand Up @@ -2364,11 +2336,6 @@ fileprivate final class TokenStreamCreator: SyntaxVisitor {
return .skipChildren
}

override func visit(_ node: NonEmptyTokenListSyntax) -> SyntaxVisitorContinueKind {
verbatimToken(Syntax(node))
return .skipChildren
}

// MARK: - Token handling

override func visit(_ token: TokenSyntax) -> SyntaxVisitorContinueKind {
Expand Down

0 comments on commit fcbe608

Please sign in to comment.