Skip to content

Commit 733ed5a

Browse files
committed
Remove trailing space for init keyword
1 parent cec9680 commit 733ed5a

File tree

4 files changed

+9
-16
lines changed

4 files changed

+9
-16
lines changed

CodeGeneration/Sources/SyntaxSupport/KeywordSpec.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public let KEYWORDS: [KeywordSpec] = [
110110
KeywordSpec("cType"),
111111
KeywordSpec("default", isLexerClassified: true),
112112
KeywordSpec("defer", isLexerClassified: true, requiresTrailingSpace: true),
113-
KeywordSpec("deinit", isLexerClassified: true, requiresTrailingSpace: true),
113+
KeywordSpec("deinit", isLexerClassified: true),
114114
KeywordSpec("deprecated"),
115115
KeywordSpec("derivative"),
116116
KeywordSpec("didSet"),

Sources/SwiftBasicFormat/generated/BasicFormat.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,6 @@ open class BasicFormat: SyntaxRewriter {
249249
return true
250250
case .keyword(.`defer`):
251251
return true
252-
case .keyword(.`deinit`):
253-
return true
254252
case .keyword(.`else`):
255253
return true
256254
case .keyword(.`enum`):

Tests/SwiftSyntaxBuilderTest/CollectionNodeFlatteningTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import SwiftSyntax
1515
import SwiftSyntaxBuilder
1616

1717
final class CollectionNodeFlatteningTests: XCTestCase {
18-
1918
func test_FlattenCodeBlockItemListWithBuilder() {
2019
let leadingTrivia = Trivia.unexpectedText("")
2120

Tests/SwiftSyntaxBuilderTest/ReturnStmsTests.swift

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,12 @@ import SwiftSyntax
1515
import SwiftSyntaxBuilder
1616

1717
final class ReturnStmtTests: XCTestCase {
18-
1918
func testReturnStmt() {
20-
let buildable = StmtSyntax("return Self.parse(from: &parser)")
21-
22-
AssertBuildResult(
23-
buildable,
24-
"""
25-
return Self.parse(from: &parser)
26-
"""
27-
)
28-
}
29-
30-
func testReturnStmtwithAsKeyword() {
3119
let testCases: [UInt: (StmtSyntax, String)] = [
20+
#line: (
21+
StmtSyntax("return Self.parse(from: &parser)"),
22+
"return Self.parse(from: &parser)"
23+
),
3224
#line: (
3325
StmtSyntax("return self.asProtocol(SyntaxProtocol.self) as? DeclSyntaxProtocol"),
3426
"return self.asProtocol(SyntaxProtocol.self) as? DeclSyntaxProtocol"
@@ -45,6 +37,10 @@ final class ReturnStmtTests: XCTestCase {
4537
StmtSyntax("return !myBool"),
4638
"return !myBool"
4739
),
40+
#line: (
41+
StmtSyntax("return data.child(at: 2, parent: Syntax(self)).map(UnexpectedNodesSyntax.init)"),
42+
"return data.child(at: 2, parent: Syntax(self)).map(UnexpectedNodesSyntax.init)"
43+
),
4844
]
4945

5046
for (line, testCase) in testCases {

0 commit comments

Comments
 (0)