@@ -34,7 +34,7 @@ public struct RawDeclSyntax: RawDeclSyntaxNodeProtocol {
34
34
35
35
public static func isKindOf(_ raw: RawSyntax) -> Bool {
36
36
switch raw.kind {
37
- case .unknownDecl, . missingDecl, .typealiasDecl, .associatedtypeDecl, .ifConfigDecl, .poundErrorDecl, .poundWarningDecl, .poundSourceLocation, .classDecl, .actorDecl, .structDecl, .protocolDecl, .extensionDecl, .functionDecl, .initializerDecl, .deinitializerDecl, .subscriptDecl, .importDecl, .accessorDecl, .variableDecl, .enumCaseDecl, .enumDecl, .operatorDecl, .precedenceGroupDecl, .macroDecl, .macroExpansionDecl: return true
37
+ case .missingDecl, .typealiasDecl, .associatedtypeDecl, .ifConfigDecl, .poundErrorDecl, .poundWarningDecl, .poundSourceLocation, .classDecl, .actorDecl, .structDecl, .protocolDecl, .extensionDecl, .functionDecl, .initializerDecl, .deinitializerDecl, .subscriptDecl, .importDecl, .accessorDecl, .variableDecl, .enumCaseDecl, .enumDecl, .operatorDecl, .precedenceGroupDecl, .macroDecl, .macroExpansionDecl: return true
38
38
default: return false
39
39
}
40
40
}
@@ -65,7 +65,7 @@ public struct RawExprSyntax: RawExprSyntaxNodeProtocol {
65
65
66
66
public static func isKindOf(_ raw: RawSyntax) -> Bool {
67
67
switch raw.kind {
68
- case .unknownExpr, . missingExpr, .inOutExpr, .poundColumnExpr, .tryExpr, .awaitExpr, .moveExpr, .identifierExpr, .superRefExpr, .nilLiteralExpr, .discardAssignmentExpr, .assignmentExpr, .sequenceExpr, .symbolicReferenceExpr, .prefixOperatorExpr, .binaryOperatorExpr, .arrowExpr, .infixOperatorExpr, .floatLiteralExpr, .tupleExpr, .arrayExpr, .dictionaryExpr, .integerLiteralExpr, .booleanLiteralExpr, .unresolvedTernaryExpr, .ternaryExpr, .memberAccessExpr, .unresolvedIsExpr, .isExpr, .unresolvedAsExpr, .asExpr, .typeExpr, .closureExpr, .unresolvedPatternExpr, .functionCallExpr, .subscriptExpr, .optionalChainingExpr, .forcedValueExpr, .postfixUnaryExpr, .specializeExpr, .stringLiteralExpr, .regexLiteralExpr, .keyPathExpr, .macroExpansionExpr, .postfixIfConfigExpr, .editorPlaceholderExpr: return true
68
+ case .missingExpr, .inOutExpr, .poundColumnExpr, .tryExpr, .awaitExpr, .moveExpr, .identifierExpr, .superRefExpr, .nilLiteralExpr, .discardAssignmentExpr, .assignmentExpr, .sequenceExpr, .symbolicReferenceExpr, .prefixOperatorExpr, .binaryOperatorExpr, .arrowExpr, .infixOperatorExpr, .floatLiteralExpr, .tupleExpr, .arrayExpr, .dictionaryExpr, .integerLiteralExpr, .booleanLiteralExpr, .unresolvedTernaryExpr, .ternaryExpr, .memberAccessExpr, .unresolvedIsExpr, .isExpr, .unresolvedAsExpr, .asExpr, .typeExpr, .closureExpr, .unresolvedPatternExpr, .functionCallExpr, .subscriptExpr, .optionalChainingExpr, .forcedValueExpr, .postfixUnaryExpr, .specializeExpr, .stringLiteralExpr, .regexLiteralExpr, .keyPathExpr, .macroExpansionExpr, .postfixIfConfigExpr, .editorPlaceholderExpr: return true
69
69
default: return false
70
70
}
71
71
}
@@ -96,7 +96,7 @@ public struct RawStmtSyntax: RawStmtSyntaxNodeProtocol {
96
96
97
97
public static func isKindOf(_ raw: RawSyntax) -> Bool {
98
98
switch raw.kind {
99
- case .unknownStmt, . missingStmt, .labeledStmt, .continueStmt, .whileStmt, .deferStmt, .expressionStmt, .repeatWhileStmt, .guardStmt, .forInStmt, .switchStmt, .doStmt, .returnStmt, .yieldStmt, .fallthroughStmt, .breakStmt, .declarationStmt, .throwStmt, .ifStmt, .poundAssertStmt: return true
99
+ case .missingStmt, .labeledStmt, .continueStmt, .whileStmt, .deferStmt, .expressionStmt, .repeatWhileStmt, .guardStmt, .forInStmt, .switchStmt, .doStmt, .returnStmt, .yieldStmt, .fallthroughStmt, .breakStmt, .declarationStmt, .throwStmt, .ifStmt, .poundAssertStmt: return true
100
100
default: return false
101
101
}
102
102
}
@@ -127,7 +127,7 @@ public struct RawTypeSyntax: RawTypeSyntaxNodeProtocol {
127
127
128
128
public static func isKindOf(_ raw: RawSyntax) -> Bool {
129
129
switch raw.kind {
130
- case .unknownType, . missingType, .simpleTypeIdentifier, .memberTypeIdentifier, .classRestrictionType, .arrayType, .dictionaryType, .metatypeType, .optionalType, .constrainedSugarType, .implicitlyUnwrappedOptionalType, .compositionType, .packExpansionType, .tupleType, .functionType, .attributedType, .namedOpaqueReturnType: return true
130
+ case .missingType, .simpleTypeIdentifier, .memberTypeIdentifier, .classRestrictionType, .arrayType, .dictionaryType, .metatypeType, .optionalType, .constrainedSugarType, .implicitlyUnwrappedOptionalType, .compositionType, .packExpansionType, .tupleType, .functionType, .attributedType, .namedOpaqueReturnType: return true
131
131
default: return false
132
132
}
133
133
}
@@ -158,7 +158,7 @@ public struct RawPatternSyntax: RawPatternSyntaxNodeProtocol {
158
158
159
159
public static func isKindOf(_ raw: RawSyntax) -> Bool {
160
160
switch raw.kind {
161
- case .unknownPattern, . missingPattern, .enumCasePattern, .isTypePattern, .optionalPattern, .identifierPattern, .asTypePattern, .tuplePattern, .wildcardPattern, .expressionPattern, .valueBindingPattern: return true
161
+ case .missingPattern, .enumCasePattern, .isTypePattern, .optionalPattern, .identifierPattern, .asTypePattern, .tuplePattern, .wildcardPattern, .expressionPattern, .valueBindingPattern: return true
162
162
default: return false
163
163
}
164
164
}
@@ -179,131 +179,6 @@ public struct RawPatternSyntax: RawPatternSyntaxNodeProtocol {
179
179
}
180
180
}
181
181
182
- @_spi(RawSyntax)
183
- public struct RawUnknownDeclSyntax: RawDeclSyntaxNodeProtocol {
184
-
185
- @_spi(RawSyntax)
186
- public var layoutView: RawSyntaxLayoutView {
187
- return raw.layoutView!
188
- }
189
-
190
- public static func isKindOf(_ raw: RawSyntax) -> Bool {
191
- return raw.kind == .unknownDecl
192
- }
193
-
194
- public var raw: RawSyntax
195
- init(raw: RawSyntax) {
196
- assert(Self.isKindOf(raw))
197
- self.raw = raw
198
- }
199
-
200
- public init?<Node: RawSyntaxNodeProtocol>(_ other: Node) {
201
- guard Self.isKindOf(other.raw) else { return nil }
202
- self.init(raw: other.raw)
203
- }
204
-
205
- }
206
-
207
- @_spi(RawSyntax)
208
- public struct RawUnknownExprSyntax: RawExprSyntaxNodeProtocol {
209
-
210
- @_spi(RawSyntax)
211
- public var layoutView: RawSyntaxLayoutView {
212
- return raw.layoutView!
213
- }
214
-
215
- public static func isKindOf(_ raw: RawSyntax) -> Bool {
216
- return raw.kind == .unknownExpr
217
- }
218
-
219
- public var raw: RawSyntax
220
- init(raw: RawSyntax) {
221
- assert(Self.isKindOf(raw))
222
- self.raw = raw
223
- }
224
-
225
- public init?<Node: RawSyntaxNodeProtocol>(_ other: Node) {
226
- guard Self.isKindOf(other.raw) else { return nil }
227
- self.init(raw: other.raw)
228
- }
229
-
230
- }
231
-
232
- @_spi(RawSyntax)
233
- public struct RawUnknownStmtSyntax: RawStmtSyntaxNodeProtocol {
234
-
235
- @_spi(RawSyntax)
236
- public var layoutView: RawSyntaxLayoutView {
237
- return raw.layoutView!
238
- }
239
-
240
- public static func isKindOf(_ raw: RawSyntax) -> Bool {
241
- return raw.kind == .unknownStmt
242
- }
243
-
244
- public var raw: RawSyntax
245
- init(raw: RawSyntax) {
246
- assert(Self.isKindOf(raw))
247
- self.raw = raw
248
- }
249
-
250
- public init?<Node: RawSyntaxNodeProtocol>(_ other: Node) {
251
- guard Self.isKindOf(other.raw) else { return nil }
252
- self.init(raw: other.raw)
253
- }
254
-
255
- }
256
-
257
- @_spi(RawSyntax)
258
- public struct RawUnknownTypeSyntax: RawTypeSyntaxNodeProtocol {
259
-
260
- @_spi(RawSyntax)
261
- public var layoutView: RawSyntaxLayoutView {
262
- return raw.layoutView!
263
- }
264
-
265
- public static func isKindOf(_ raw: RawSyntax) -> Bool {
266
- return raw.kind == .unknownType
267
- }
268
-
269
- public var raw: RawSyntax
270
- init(raw: RawSyntax) {
271
- assert(Self.isKindOf(raw))
272
- self.raw = raw
273
- }
274
-
275
- public init?<Node: RawSyntaxNodeProtocol>(_ other: Node) {
276
- guard Self.isKindOf(other.raw) else { return nil }
277
- self.init(raw: other.raw)
278
- }
279
-
280
- }
281
-
282
- @_spi(RawSyntax)
283
- public struct RawUnknownPatternSyntax: RawPatternSyntaxNodeProtocol {
284
-
285
- @_spi(RawSyntax)
286
- public var layoutView: RawSyntaxLayoutView {
287
- return raw.layoutView!
288
- }
289
-
290
- public static func isKindOf(_ raw: RawSyntax) -> Bool {
291
- return raw.kind == .unknownPattern
292
- }
293
-
294
- public var raw: RawSyntax
295
- init(raw: RawSyntax) {
296
- assert(Self.isKindOf(raw))
297
- self.raw = raw
298
- }
299
-
300
- public init?<Node: RawSyntaxNodeProtocol>(_ other: Node) {
301
- guard Self.isKindOf(other.raw) else { return nil }
302
- self.init(raw: other.raw)
303
- }
304
-
305
- }
306
-
307
182
@_spi(RawSyntax)
308
183
public struct RawMissingSyntax: RawSyntaxNodeProtocol {
309
184
0 commit comments