Skip to content

Commit 13b50ad

Browse files
committed
Update codegenerated files
1 parent fc86c25 commit 13b50ad

File tree

11 files changed

+35
-35
lines changed

11 files changed

+35
-35
lines changed

Sources/SwiftIDEUtils/generated/SyntaxClassification.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ extension RawTokenKind {
200200
return .none
201201
case .wildcard:
202202
return .none
203-
case .eof:
203+
case .endOfFile:
204204
return .none
205205
}
206206
}

Sources/SwiftParser/generated/IsLexerClassified.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,6 @@ extension TokenKind {
140140
@_spi(Diagnostics) @_spi(Testing)
141141
public var isLexerClassifiedKeyword: Bool {
142142
switch self {
143-
case .eof:
144-
return false
145143
case .poundAvailableKeyword:
146144
return true
147145
case .poundElseKeyword:

Sources/SwiftParser/generated/TokenSpecStaticMembers.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
@_spi(RawSyntax) import SwiftSyntax
1616

1717
extension TokenSpec {
18-
static var eof: TokenSpec {
19-
return TokenSpec(.eof)
20-
}
21-
2218
static var arrow: TokenSpec {
2319
return TokenSpec(.arrow)
2420
}
@@ -207,6 +203,10 @@ extension TokenSpec {
207203
return TokenSpec(.wildcard)
208204
}
209205

206+
static var endOfFile: TokenSpec {
207+
return TokenSpec(.endOfFile)
208+
}
209+
210210
static func keyword(_ keyword: Keyword) -> TokenSpec {
211211
return TokenSpec(keyword)
212212
}

Sources/SwiftParserDiagnostics/generated/TokenNameForDiagnostics.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
extension TokenKind {
1818
var nameForDiagnostics: String {
1919
switch self {
20-
case .eof:
21-
return "end of file"
2220
case .arrow:
2321
return #"->"#
2422
case .atSign:
@@ -113,6 +111,8 @@ extension TokenKind {
113111
return #"token"#
114112
case .wildcard:
115113
return #"wildcard"#
114+
case .endOfFile:
115+
return #"end of file"#
116116
case .keyword(let keyword):
117117
return String(syntaxText: keyword.defaultText)
118118
}

Sources/SwiftSyntax/generated/RenamedChildrenCompatibility.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3446,7 +3446,7 @@ extension SourceFileSyntax {
34463446
_ unexpectedBeforeStatements: UnexpectedNodesSyntax? = nil,
34473447
statements: CodeBlockItemListSyntax,
34483448
_ unexpectedBetweenStatementsAndEOFToken: UnexpectedNodesSyntax? = nil,
3449-
eofToken: TokenSyntax = .eof(),
3449+
eofToken: TokenSyntax = .endOfFileToken(),
34503450
_ unexpectedAfterEOFToken: UnexpectedNodesSyntax? = nil,
34513451
trailingTrivia: Trivia? = nil
34523452

Sources/SwiftSyntax/generated/TokenKind.swift

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
/// Enumerates the kinds of tokens in the Swift language.
1616
public enum TokenKind: Hashable {
17-
case eof
1817
case arrow
1918
case atSign
2019
case backslash
@@ -63,6 +62,7 @@ public enum TokenKind: Hashable {
6362
case stringSegment(String)
6463
case unknown(String)
6564
case wildcard
65+
case endOfFile
6666

6767
/// The textual representation of this token kind.
6868
@_spi(Testing)
@@ -164,8 +164,8 @@ public enum TokenKind: Hashable {
164164
return text
165165
case .wildcard:
166166
return #"_"#
167-
case .eof:
168-
return ""
167+
case .endOfFile:
168+
return #""#
169169
}
170170
}
171171

@@ -245,8 +245,8 @@ public enum TokenKind: Hashable {
245245
return #"""#
246246
case .wildcard:
247247
return #"_"#
248-
case .eof:
249-
return ""
248+
case .endOfFile:
249+
return #""#
250250
default:
251251
return ""
252252
}
@@ -259,8 +259,6 @@ public enum TokenKind: Hashable {
259259
/// quote characters in a string literal.
260260
public var isPunctuation: Bool {
261261
switch self {
262-
case .eof:
263-
return false
264262
case .arrow:
265263
return true
266264
case .atSign:
@@ -357,15 +355,15 @@ public enum TokenKind: Hashable {
357355
return false
358356
case .wildcard:
359357
return false
358+
case .endOfFile:
359+
return false
360360
}
361361
}
362362
}
363363

364364
extension TokenKind: Equatable {
365365
public static func == (lhs: TokenKind, rhs: TokenKind) -> Bool {
366366
switch (lhs, rhs) {
367-
case (.eof, .eof):
368-
return true
369367
case (.arrow, .arrow):
370368
return true
371369
case (.atSign, .atSign):
@@ -462,6 +460,8 @@ extension TokenKind: Equatable {
462460
return lhsText == rhsText
463461
case (.wildcard, .wildcard):
464462
return true
463+
case (.endOfFile, .endOfFile):
464+
return true
465465
default:
466466
return false
467467
}
@@ -475,7 +475,6 @@ extension TokenKind: Equatable {
475475
@frozen // FIXME: Not actually stable, works around a miscompile
476476
@_spi(RawSyntax)
477477
public enum RawTokenKind: UInt8, Equatable, Hashable {
478-
case eof
479478
case arrow
480479
case atSign
481480
case backslash
@@ -524,12 +523,11 @@ public enum RawTokenKind: UInt8, Equatable, Hashable {
524523
case stringSegment
525524
case unknown
526525
case wildcard
526+
case endOfFile
527527

528528
@_spi(RawSyntax)
529529
public var defaultText: SyntaxText? {
530530
switch self {
531-
case .eof:
532-
return ""
533531
case .arrow:
534532
return #"->"#
535533
case .atSign:
@@ -600,6 +598,8 @@ public enum RawTokenKind: UInt8, Equatable, Hashable {
600598
return #"""#
601599
case .wildcard:
602600
return #"_"#
601+
case .endOfFile:
602+
return #""#
603603
default:
604604
return nil
605605
}
@@ -612,8 +612,6 @@ public enum RawTokenKind: UInt8, Equatable, Hashable {
612612
/// quote characters in a string literal.
613613
public var isPunctuation: Bool {
614614
switch self {
615-
case .eof:
616-
return false
617615
case .arrow:
618616
return true
619617
case .atSign:
@@ -710,6 +708,8 @@ public enum RawTokenKind: UInt8, Equatable, Hashable {
710708
return false
711709
case .wildcard:
712710
return false
711+
case .endOfFile:
712+
return false
713713
}
714714
}
715715
}
@@ -719,8 +719,6 @@ extension TokenKind {
719719
@_spi(RawSyntax)
720720
public static func fromRaw(kind rawKind: RawTokenKind, text: String) -> TokenKind {
721721
switch rawKind {
722-
case .eof:
723-
return .eof
724722
case .arrow:
725723
precondition(text.isEmpty || rawKind.defaultText.map(String.init) == text)
726724
return .arrow
@@ -855,6 +853,9 @@ extension TokenKind {
855853
case .wildcard:
856854
precondition(text.isEmpty || rawKind.defaultText.map(String.init) == text)
857855
return .wildcard
856+
case .endOfFile:
857+
precondition(text.isEmpty || rawKind.defaultText.map(String.init) == text)
858+
return .endOfFile
858859
}
859860
}
860861

@@ -863,8 +864,6 @@ extension TokenKind {
863864
@_spi(RawSyntax)
864865
public func decomposeToRaw() -> (rawKind: RawTokenKind, string: String?) {
865866
switch self {
866-
case .eof:
867-
return (.eof, nil)
868867
case .arrow:
869868
return (.arrow, nil)
870869
case .atSign:
@@ -961,6 +960,8 @@ extension TokenKind {
961960
return (.unknown, str)
962961
case .wildcard:
963962
return (.wildcard, nil)
963+
case .endOfFile:
964+
return (.endOfFile, nil)
964965
}
965966
}
966967
}

Sources/SwiftSyntax/generated/Tokens.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -711,14 +711,15 @@ extension TokenSyntax {
711711
)
712712
}
713713

714-
public static func eof(
714+
public static func endOfFileToken(
715715
leadingTrivia: Trivia = [],
716+
trailingTrivia: Trivia = [],
716717
presence: SourcePresence = .present
717718
) -> TokenSyntax {
718719
return TokenSyntax(
719-
.eof,
720+
.endOfFile,
720721
leadingTrivia: leadingTrivia,
721-
trailingTrivia: [],
722+
trailingTrivia: trailingTrivia,
722723
presence: presence
723724

724725
)

Sources/SwiftSyntax/generated/raw/RawSyntaxValidation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2293,7 +2293,7 @@ func validateLayout(layout: RawSyntaxBuffer, as kind: SyntaxKind) {
22932293
assertNoError(kind, 0, verify(layout[0], as: RawUnexpectedNodesSyntax?.self))
22942294
assertNoError(kind, 1, verify(layout[1], as: RawCodeBlockItemListSyntax.self))
22952295
assertNoError(kind, 2, verify(layout[2], as: RawUnexpectedNodesSyntax?.self))
2296-
assertNoError(kind, 3, verify(layout[3], as: RawTokenSyntax.self, tokenChoices: [.tokenKind(.eof)]))
2296+
assertNoError(kind, 3, verify(layout[3], as: RawTokenSyntax.self, tokenChoices: [.tokenKind(.endOfFile)]))
22972297
assertNoError(kind, 4, verify(layout[4], as: RawUnexpectedNodesSyntax?.self))
22982298
case .specializeAttributeSpecList:
22992299
for (index, element) in layout.enumerated() {

Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodes.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16687,7 +16687,7 @@ public struct SourceFileSyntax: SyntaxProtocol, SyntaxHashable {
1668716687
_ unexpectedBeforeStatements: UnexpectedNodesSyntax? = nil,
1668816688
statements: CodeBlockItemListSyntax,
1668916689
_ unexpectedBetweenStatementsAndEndOfFileToken: UnexpectedNodesSyntax? = nil,
16690-
endOfFileToken: TokenSyntax = .eof(),
16690+
endOfFileToken: TokenSyntax = .endOfFileToken(),
1669116691
_ unexpectedAfterEndOfFileToken: UnexpectedNodesSyntax? = nil,
1669216692
trailingTrivia: Trivia? = nil
1669316693

Sources/SwiftSyntaxBuilder/generated/BuildableNodes.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,7 @@ extension SourceFileSyntax {
12221222
leadingTrivia: Trivia? = nil,
12231223
unexpectedBeforeStatements: UnexpectedNodesSyntax? = nil,
12241224
unexpectedBetweenStatementsAndEndOfFileToken: UnexpectedNodesSyntax? = nil,
1225-
endOfFileToken: TokenSyntax = .eof(),
1225+
endOfFileToken: TokenSyntax = .endOfFileToken(),
12261226
unexpectedAfterEndOfFileToken: UnexpectedNodesSyntax? = nil,
12271227
@CodeBlockItemListBuilder statementsBuilder: () throws -> CodeBlockItemListSyntax,
12281228
trailingTrivia: Trivia? = nil

Sources/SwiftSyntaxBuilder/generated/RenamedChildrenBuilderCompatibility.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ extension SourceFileSyntax {
381381
leadingTrivia: Trivia? = nil,
382382
unexpectedBeforeStatements: UnexpectedNodesSyntax? = nil,
383383
unexpectedBetweenStatementsAndEOFToken: UnexpectedNodesSyntax? = nil,
384-
eofToken: TokenSyntax = .eof(),
384+
eofToken: TokenSyntax = .endOfFileToken(),
385385
unexpectedAfterEOFToken: UnexpectedNodesSyntax? = nil,
386386
@CodeBlockItemListBuilder statementsBuilder: () throws -> CodeBlockItemListSyntax,
387387
trailingTrivia: Trivia? = nil

0 commit comments

Comments
 (0)