Skip to content

Commit 2abcb73

Browse files
committed
Update generated code
1 parent f8b1562 commit 2abcb73

File tree

5 files changed

+41
-41
lines changed

5 files changed

+41
-41
lines changed

Sources/SwiftIDEUtils/generated/SyntaxClassification.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ extension RawTokenKind {
122122
return .dollarIdentifier
123123
case .ellipsis:
124124
return .none
125+
case .endOfFile:
126+
return .none
125127
case .equal:
126128
return .none
127129
case .exclamationMark:
@@ -200,8 +202,6 @@ extension RawTokenKind {
200202
return .none
201203
case .wildcard:
202204
return .none
203-
case .endOfFile:
204-
return .none
205205
}
206206
}
207207
}

Sources/SwiftParser/generated/TokenSpecStaticMembers.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ extension TokenSpec {
5151
return TokenSpec(.ellipsis)
5252
}
5353

54+
static var endOfFile: TokenSpec {
55+
return TokenSpec(.endOfFile)
56+
}
57+
5458
static var equal: TokenSpec {
5559
return TokenSpec(.equal)
5660
}
@@ -203,10 +207,6 @@ extension TokenSpec {
203207
return TokenSpec(.wildcard)
204208
}
205209

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
@@ -35,6 +35,8 @@ extension TokenKind {
3535
return #"dollar identifier"#
3636
case .ellipsis:
3737
return #"..."#
38+
case .endOfFile:
39+
return #"end of file"#
3840
case .equal:
3941
return #"="#
4042
case .exclamationMark:
@@ -111,8 +113,6 @@ extension TokenKind {
111113
return #"token"#
112114
case .wildcard:
113115
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/TokenKind.swift

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public enum TokenKind: Hashable {
2323
case comma
2424
case dollarIdentifier(String)
2525
case ellipsis
26+
case endOfFile
2627
case equal
2728
case exclamationMark
2829
case extendedRegexDelimiter(String)
@@ -62,7 +63,6 @@ public enum TokenKind: Hashable {
6263
case stringSegment(String)
6364
case unknown(String)
6465
case wildcard
65-
case endOfFile
6666

6767
/// The textual representation of this token kind.
6868
@_spi(Testing)
@@ -86,6 +86,8 @@ public enum TokenKind: Hashable {
8686
return text
8787
case .ellipsis:
8888
return #"..."#
89+
case .endOfFile:
90+
return #""#
8991
case .equal:
9092
return #"="#
9193
case .exclamationMark:
@@ -164,8 +166,6 @@ public enum TokenKind: Hashable {
164166
return text
165167
case .wildcard:
166168
return #"_"#
167-
case .endOfFile:
168-
return #""#
169169
}
170170
}
171171

@@ -187,6 +187,8 @@ public enum TokenKind: Hashable {
187187
return #","#
188188
case .ellipsis:
189189
return #"..."#
190+
case .endOfFile:
191+
return #""#
190192
case .equal:
191193
return #"="#
192194
case .exclamationMark:
@@ -245,8 +247,6 @@ public enum TokenKind: Hashable {
245247
return #"""#
246248
case .wildcard:
247249
return #"_"#
248-
case .endOfFile:
249-
return #""#
250250
default:
251251
return ""
252252
}
@@ -277,6 +277,8 @@ public enum TokenKind: Hashable {
277277
return false
278278
case .ellipsis:
279279
return true
280+
case .endOfFile:
281+
return false
280282
case .equal:
281283
return true
282284
case .exclamationMark:
@@ -355,8 +357,6 @@ public enum TokenKind: Hashable {
355357
return false
356358
case .wildcard:
357359
return false
358-
case .endOfFile:
359-
return false
360360
}
361361
}
362362
}
@@ -382,6 +382,8 @@ extension TokenKind: Equatable {
382382
return lhsText == rhsText
383383
case (.ellipsis, .ellipsis):
384384
return true
385+
case (.endOfFile, .endOfFile):
386+
return true
385387
case (.equal, .equal):
386388
return true
387389
case (.exclamationMark, .exclamationMark):
@@ -460,8 +462,6 @@ extension TokenKind: Equatable {
460462
return lhsText == rhsText
461463
case (.wildcard, .wildcard):
462464
return true
463-
case (.endOfFile, .endOfFile):
464-
return true
465465
default:
466466
return false
467467
}
@@ -484,6 +484,7 @@ public enum RawTokenKind: UInt8, Equatable, Hashable {
484484
case comma
485485
case dollarIdentifier
486486
case ellipsis
487+
case endOfFile
487488
case equal
488489
case exclamationMark
489490
case extendedRegexDelimiter
@@ -523,7 +524,6 @@ public enum RawTokenKind: UInt8, Equatable, Hashable {
523524
case stringSegment
524525
case unknown
525526
case wildcard
526-
case endOfFile
527527

528528
@_spi(RawSyntax)
529529
public var defaultText: SyntaxText? {
@@ -542,6 +542,8 @@ public enum RawTokenKind: UInt8, Equatable, Hashable {
542542
return #","#
543543
case .ellipsis:
544544
return #"..."#
545+
case .endOfFile:
546+
return #""#
545547
case .equal:
546548
return #"="#
547549
case .exclamationMark:
@@ -598,8 +600,6 @@ public enum RawTokenKind: UInt8, Equatable, Hashable {
598600
return #"""#
599601
case .wildcard:
600602
return #"_"#
601-
case .endOfFile:
602-
return #""#
603603
default:
604604
return nil
605605
}
@@ -630,6 +630,8 @@ public enum RawTokenKind: UInt8, Equatable, Hashable {
630630
return false
631631
case .ellipsis:
632632
return true
633+
case .endOfFile:
634+
return false
633635
case .equal:
634636
return true
635637
case .exclamationMark:
@@ -708,8 +710,6 @@ public enum RawTokenKind: UInt8, Equatable, Hashable {
708710
return false
709711
case .wildcard:
710712
return false
711-
case .endOfFile:
712-
return false
713713
}
714714
}
715715
}
@@ -744,6 +744,9 @@ extension TokenKind {
744744
case .ellipsis:
745745
precondition(text.isEmpty || rawKind.defaultText.map(String.init) == text)
746746
return .ellipsis
747+
case .endOfFile:
748+
precondition(text.isEmpty || rawKind.defaultText.map(String.init) == text)
749+
return .endOfFile
747750
case .equal:
748751
precondition(text.isEmpty || rawKind.defaultText.map(String.init) == text)
749752
return .equal
@@ -853,9 +856,6 @@ extension TokenKind {
853856
case .wildcard:
854857
precondition(text.isEmpty || rawKind.defaultText.map(String.init) == text)
855858
return .wildcard
856-
case .endOfFile:
857-
precondition(text.isEmpty || rawKind.defaultText.map(String.init) == text)
858-
return .endOfFile
859859
}
860860
}
861861

@@ -882,6 +882,8 @@ extension TokenKind {
882882
return (.dollarIdentifier, str)
883883
case .ellipsis:
884884
return (.ellipsis, nil)
885+
case .endOfFile:
886+
return (.endOfFile, nil)
885887
case .equal:
886888
return (.equal, nil)
887889
case .exclamationMark:
@@ -960,8 +962,6 @@ extension TokenKind {
960962
return (.unknown, str)
961963
case .wildcard:
962964
return (.wildcard, nil)
963-
case .endOfFile:
964-
return (.endOfFile, nil)
965965
}
966966
}
967967
}

Sources/SwiftSyntax/generated/Tokens.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,20 @@ extension TokenSyntax {
143143
)
144144
}
145145

146+
public static func endOfFileToken(
147+
leadingTrivia: Trivia = [],
148+
trailingTrivia: Trivia = [],
149+
presence: SourcePresence = .present
150+
) -> TokenSyntax {
151+
return TokenSyntax(
152+
.endOfFile,
153+
leadingTrivia: leadingTrivia,
154+
trailingTrivia: trailingTrivia,
155+
presence: presence
156+
157+
)
158+
}
159+
146160
public static func equalToken(
147161
leadingTrivia: Trivia = [],
148162
trailingTrivia: Trivia = [],
@@ -710,18 +724,4 @@ extension TokenSyntax {
710724

711725
)
712726
}
713-
714-
public static func endOfFileToken(
715-
leadingTrivia: Trivia = [],
716-
trailingTrivia: Trivia = [],
717-
presence: SourcePresence = .present
718-
) -> TokenSyntax {
719-
return TokenSyntax(
720-
.endOfFile,
721-
leadingTrivia: leadingTrivia,
722-
trailingTrivia: trailingTrivia,
723-
presence: presence
724-
725-
)
726-
}
727727
}

0 commit comments

Comments
 (0)