Skip to content

Commit 8f85335

Browse files
committed
Remove text_choices and model the text choices in token_choices
1 parent 766d039 commit 8f85335

File tree

1 file changed

+15
-260
lines changed

1 file changed

+15
-260
lines changed

Sources/SwiftSyntax/generated/Keyword.swift

Lines changed: 15 additions & 260 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ public enum Keyword: UInt8, Hashable {
147147

148148
case before
149149

150-
<<<<<<< HEAD
150+
case block
151+
151152
case `break`
152153

153154
case `case`
@@ -162,6 +163,8 @@ public enum Keyword: UInt8, Hashable {
162163

163164
case convention
164165

166+
case cType
167+
165168
case `default`
166169

167170
case `defer`
@@ -200,6 +203,8 @@ public enum Keyword: UInt8, Hashable {
200203

201204
case `false`
202205

206+
case file
207+
203208
case `fileprivate`
204209

205210
case final
@@ -242,8 +247,12 @@ public enum Keyword: UInt8, Hashable {
242247

243248
case lazy
244249

250+
case left
251+
245252
case `let`
246253

254+
case line
255+
247256
case lowerThan
248257

249258
case macro
@@ -391,261 +400,6 @@ public enum Keyword: UInt8, Hashable {
391400
case wrt
392401

393402
case yield
394-
=======
395-
case block = 61
396-
397-
case `break` = 62
398-
399-
case `case` = 63
400-
401-
case `catch` = 64
402-
403-
case `class` = 65
404-
405-
case `continue` = 66
406-
407-
case convenience = 67
408-
409-
case convention = 68
410-
411-
case cType = 69
412-
413-
case `default` = 70
414-
415-
case `defer` = 71
416-
417-
case `deinit` = 72
418-
419-
case deprecated = 73
420-
421-
case derivative = 74
422-
423-
case didSet = 75
424-
425-
case differentiable = 76
426-
427-
case distributed = 77
428-
429-
case `do` = 78
430-
431-
case dynamic = 79
432-
433-
case each = 80
434-
435-
case `else` = 81
436-
437-
case `enum` = 82
438-
439-
case escaping = 83
440-
441-
case exclusivity = 84
442-
443-
case exported = 85
444-
445-
case `extension` = 86
446-
447-
case `fallthrough` = 87
448-
449-
case `false` = 88
450-
451-
case file = 89
452-
453-
case `fileprivate` = 90
454-
455-
case final = 91
456-
457-
case `for` = 92
458-
459-
case `func` = 93
460-
461-
case get = 94
462-
463-
case `guard` = 95
464-
465-
case higherThan = 96
466-
467-
case `if` = 97
468-
469-
case `import` = 98
470-
471-
case `in` = 99
472-
473-
case indirect = 100
474-
475-
case infix = 101
476-
477-
case `init` = 102
478-
479-
case inline = 103
480-
481-
case `inout` = 104
482-
483-
case `internal` = 105
484-
485-
case introduced = 106
486-
487-
case `is` = 107
488-
489-
case isolated = 108
490-
491-
case kind = 109
492-
493-
case lazy = 110
494-
495-
case left = 111
496-
497-
case `let` = 112
498-
499-
case line = 113
500-
501-
case lowerThan = 114
502-
503-
case macro = 115
504-
505-
case message = 116
506-
507-
case metadata = 117
508-
509-
case module = 118
510-
511-
case mutableAddressWithNativeOwner = 119
512-
513-
case mutableAddressWithOwner = 120
514-
515-
case mutating = 121
516-
517-
case `nil` = 122
518-
519-
case noasync = 123
520-
521-
case noDerivative = 124
522-
523-
case noescape = 125
524-
525-
case nonisolated = 126
526-
527-
case nonmutating = 127
528-
529-
case objc = 128
530-
531-
case obsoleted = 129
532-
533-
case of = 130
534-
535-
case open = 131
536-
537-
case `operator` = 132
538-
539-
case optional = 133
540-
541-
case override = 134
542-
543-
case package = 135
544-
545-
case postfix = 136
546-
547-
case `precedencegroup` = 137
548-
549-
case prefix = 138
550-
551-
case `private` = 139
552-
553-
case `Protocol` = 140
554-
555-
case `protocol` = 141
556-
557-
case `public` = 142
558-
559-
case reasync = 143
560-
561-
case renamed = 144
562-
563-
case `repeat` = 145
564-
565-
case required = 146
566-
567-
case `rethrows` = 147
568-
569-
case `return` = 148
570-
571-
case reverse = 149
572-
573-
case safe = 150
574-
575-
case `self` = 151
576-
577-
case `Self` = 152
578-
579-
case Sendable = 153
580-
581-
case set = 154
582-
583-
case some = 155
584-
585-
case sourceFile = 156
586-
587-
case spi = 157
588-
589-
case spiModule = 158
590-
591-
case `static` = 159
592-
593-
case `struct` = 160
594-
595-
case `subscript` = 161
596-
597-
case `super` = 162
598-
599-
case swift = 163
600-
601-
case `switch` = 164
602-
603-
case target = 165
604-
605-
case `throw` = 166
606-
607-
case `throws` = 167
608-
609-
case transpose = 168
610-
611-
case `true` = 169
612-
613-
case `try` = 170
614-
615-
case `Type` = 171
616-
617-
case `typealias` = 172
618-
619-
case unavailable = 173
620-
621-
case unchecked = 174
622-
623-
case unowned = 175
624-
625-
case unsafe = 176
626-
627-
case unsafeAddress = 177
628-
629-
case unsafeMutableAddress = 178
630-
631-
case `var` = 179
632-
633-
case visibility = 180
634-
635-
case weak = 181
636-
637-
case `where` = 182
638-
639-
case `while` = 183
640-
641-
case willSet = 184
642-
643-
case witness_method = 185
644-
645-
case wrt = 186
646-
647-
case yield = 187
648-
>>>>>>> a7a0ff37 (Remove text_choices and model the text choides in token_choices)
649403

650404
@_spi(RawSyntax) public init?(_ text: SyntaxText) {
651405
switch text.count {
@@ -1265,7 +1019,6 @@ public enum Keyword: UInt8, Hashable {
12651019
/// table is significantly faster. Ideally, we could also get the compiler to
12661020
/// constant-evaluate `Keyword.spi.defaultText` to a `SyntaxText` but I don't
12671021
/// see how that's possible right now.
1268-
<<<<<<< HEAD
12691022
private static let keywordTextLookupTable: [SyntaxText] = [
12701023
"__consuming",
12711024
"__owned",
@@ -1328,13 +1081,15 @@ public enum Keyword: UInt8, Hashable {
13281081
"available",
13291082
"await",
13301083
"before",
1084+
"block",
13311085
"break",
13321086
"case",
13331087
"catch",
13341088
"class",
13351089
"continue",
13361090
"convenience",
13371091
"convention",
1092+
"cType",
13381093
"default",
13391094
"defer",
13401095
"deinit",
@@ -1354,6 +1109,7 @@ public enum Keyword: UInt8, Hashable {
13541109
"extension",
13551110
"fallthrough",
13561111
"false",
1112+
"file",
13571113
"fileprivate",
13581114
"final",
13591115
"for",
@@ -1375,7 +1131,9 @@ public enum Keyword: UInt8, Hashable {
13751131
"isolated",
13761132
"kind",
13771133
"lazy",
1134+
"left",
13781135
"let",
1136+
"line",
13791137
"lowerThan",
13801138
"macro",
13811139
"message",
@@ -1451,9 +1209,6 @@ public enum Keyword: UInt8, Hashable {
14511209
"wrt",
14521210
"yield",
14531211
]
1454-
=======
1455-
private static let keywordTextLookupTable: [SyntaxText] = ["__consuming", "__owned", "__setter_access", "__shared", "_alignment", "_backDeploy", "_borrow", "_cdecl", "_Class", "_compilerInitialized", "_const", "_documentation", "_dynamicReplacement", "_effects", "_expose", "_forward", "_implements", "_linear", "_local", "_modify", "_move", "_NativeClass", "_NativeRefCountedObject", "_noMetadata", "_nonSendable", "_objcImplementation", "_objcRuntimeName", "_opaqueReturnTypeOf", "_optimize", "_originallyDefinedIn", "_PackageDescription", "_private", "_projectedValueProperty", "_read", "_RefCountedObject", "_semantics", "_silgen_name", "_specialize", "_spi", "_spi_available", "_swift_native_objc_runtime_base", "_Trivial", "_TrivialAtMost", "_typeEraser", "_unavailableFromAsync", "_UnknownLayout", "actor", "addressWithNativeOwner", "addressWithOwner", "any", "Any", "as", "assignment", "associatedtype", "associativity", "async", "autoclosure", "availability", "available", "await", "before", "block", "break", "case", "catch", "class", "continue", "convenience", "convention", "cType", "default", "defer", "deinit", "deprecated", "derivative", "didSet", "differentiable", "distributed", "do", "dynamic", "each", "else", "enum", "escaping", "exclusivity", "exported", "extension", "fallthrough", "false", "file", "fileprivate", "final", "for", "func", "get", "guard", "higherThan", "if", "import", "in", "indirect", "infix", "init", "inline", "inout", "internal", "introduced", "is", "isolated", "kind", "lazy", "left", "let", "line", "lowerThan", "macro", "message", "metadata", "module", "mutableAddressWithNativeOwner", "mutableAddressWithOwner", "mutating", "nil", "noasync", "noDerivative", "noescape", "nonisolated", "nonmutating", "objc", "obsoleted", "of", "open", "operator", "optional", "override", "package", "postfix", "precedencegroup", "prefix", "private", "Protocol", "protocol", "public", "reasync", "renamed", "repeat", "required", "rethrows", "return", "reverse", "safe", "self", "Self", "Sendable", "set", "some", "sourceFile", "spi", "spiModule", "static", "struct", "subscript", "super", "swift", "switch", "target", "throw", "throws", "transpose", "true", "try", "Type", "typealias", "unavailable", "unchecked", "unowned", "unsafe", "unsafeAddress", "unsafeMutableAddress", "var", "visibility", "weak", "where", "while", "willSet", "witness_method", "wrt", "yield"]
1456-
>>>>>>> a7a0ff37 (Remove text_choices and model the text choides in token_choices)
14571212

14581213
@_spi(RawSyntax)
14591214
public var defaultText: SyntaxText {

0 commit comments

Comments
 (0)