@@ -183,37 +183,37 @@ public struct DeclSyntax: DeclSyntaxProtocol, SyntaxHashable {
183
183
public let _syntaxNode : Syntax
184
184
185
185
/// Create a ``DeclSyntax`` node from a specialized syntax node.
186
- public init ( _ syntax: some DeclSyntaxProtocol ) {
186
+ public init ( _ syntax: __shared some DeclSyntaxProtocol ) {
187
187
// We know this cast is going to succeed. Go through init(_: SyntaxData)
188
188
// to do a sanity check and verify the kind matches in debug builds and get
189
189
// maximum performance in release builds.
190
190
self = Syntax ( syntax) . cast ( Self . self)
191
191
}
192
192
193
193
/// Create a ``DeclSyntax`` node from a specialized optional syntax node.
194
- public init ? ( _ syntax: ( some DeclSyntaxProtocol ) ? ) {
194
+ public init ? ( _ syntax: __shared ( some DeclSyntaxProtocol ) ? ) {
195
195
guard let syntax = syntax else {
196
196
return nil
197
197
}
198
198
self . init ( syntax)
199
199
}
200
200
201
- public init ( fromProtocol syntax: DeclSyntaxProtocol ) {
201
+ public init ( fromProtocol syntax: __shared DeclSyntaxProtocol) {
202
202
// We know this cast is going to succeed. Go through init(_: SyntaxData)
203
203
// to do a sanity check and verify the kind matches in debug builds and get
204
204
// maximum performance in release builds.
205
205
self = Syntax ( syntax) . cast ( Self . self)
206
206
}
207
207
208
208
/// Create a ``DeclSyntax`` node from a specialized optional syntax node.
209
- public init ? ( fromProtocol syntax: DeclSyntaxProtocol ? ) {
209
+ public init ? ( fromProtocol syntax: __shared DeclSyntaxProtocol? ) {
210
210
guard let syntax = syntax else {
211
211
return nil
212
212
}
213
213
self . init ( fromProtocol: syntax)
214
214
}
215
215
216
- public init ? ( _ node: some SyntaxProtocol ) {
216
+ public init ? ( _ node: __shared some SyntaxProtocol ) {
217
217
switch node. raw. kind {
218
218
case . accessorDecl, . actorDecl, . associatedTypeDecl, . classDecl, . deinitializerDecl, . editorPlaceholderDecl, . enumCaseDecl, . enumDecl, . extensionDecl, . functionDecl, . ifConfigDecl, . importDecl, . initializerDecl, . macroDecl, . macroExpansionDecl, . missingDecl, . operatorDecl, . poundSourceLocation, . precedenceGroupDecl, . protocolDecl, . structDecl, . subscriptDecl, . typeAliasDecl, . variableDecl:
219
219
self . _syntaxNode = node. _syntaxNode
@@ -510,37 +510,37 @@ public struct ExprSyntax: ExprSyntaxProtocol, SyntaxHashable {
510
510
public let _syntaxNode : Syntax
511
511
512
512
/// Create a ``ExprSyntax`` node from a specialized syntax node.
513
- public init ( _ syntax: some ExprSyntaxProtocol ) {
513
+ public init ( _ syntax: __shared some ExprSyntaxProtocol ) {
514
514
// We know this cast is going to succeed. Go through init(_: SyntaxData)
515
515
// to do a sanity check and verify the kind matches in debug builds and get
516
516
// maximum performance in release builds.
517
517
self = Syntax ( syntax) . cast ( Self . self)
518
518
}
519
519
520
520
/// Create a ``ExprSyntax`` node from a specialized optional syntax node.
521
- public init ? ( _ syntax: ( some ExprSyntaxProtocol ) ? ) {
521
+ public init ? ( _ syntax: __shared ( some ExprSyntaxProtocol ) ? ) {
522
522
guard let syntax = syntax else {
523
523
return nil
524
524
}
525
525
self . init ( syntax)
526
526
}
527
527
528
- public init ( fromProtocol syntax: ExprSyntaxProtocol ) {
528
+ public init ( fromProtocol syntax: __shared ExprSyntaxProtocol) {
529
529
// We know this cast is going to succeed. Go through init(_: SyntaxData)
530
530
// to do a sanity check and verify the kind matches in debug builds and get
531
531
// maximum performance in release builds.
532
532
self = Syntax ( syntax) . cast ( Self . self)
533
533
}
534
534
535
535
/// Create a ``ExprSyntax`` node from a specialized optional syntax node.
536
- public init ? ( fromProtocol syntax: ExprSyntaxProtocol ? ) {
536
+ public init ? ( fromProtocol syntax: __shared ExprSyntaxProtocol? ) {
537
537
guard let syntax = syntax else {
538
538
return nil
539
539
}
540
540
self . init ( fromProtocol: syntax)
541
541
}
542
542
543
- public init ? ( _ node: some SyntaxProtocol ) {
543
+ public init ? ( _ node: __shared some SyntaxProtocol ) {
544
544
switch node. raw. kind {
545
545
case . arrayExpr, . arrowExpr, . asExpr, . assignmentExpr, . awaitExpr, . binaryOperatorExpr, . booleanLiteralExpr, . borrowExpr, . _canImportExpr, . _canImportVersionInfo, . closureExpr, . consumeExpr, . copyExpr, . declReferenceExpr, . dictionaryExpr, . discardAssignmentExpr, . doExpr, . editorPlaceholderExpr, . floatLiteralExpr, . forceUnwrapExpr, . functionCallExpr, . genericSpecializationExpr, . ifExpr, . inOutExpr, . infixOperatorExpr, . integerLiteralExpr, . isExpr, . keyPathExpr, . macroExpansionExpr, . memberAccessExpr, . missingExpr, . nilLiteralExpr, . optionalChainingExpr, . packElementExpr, . packExpansionExpr, . patternExpr, . postfixIfConfigExpr, . postfixOperatorExpr, . prefixOperatorExpr, . regexLiteralExpr, . sequenceExpr, . simpleStringLiteralExpr, . stringLiteralExpr, . subscriptCallExpr, . superExpr, . switchExpr, . ternaryExpr, . tryExpr, . tupleExpr, . typeExpr, . unresolvedAsExpr, . unresolvedIsExpr, . unresolvedTernaryExpr:
546
546
self . _syntaxNode = node. _syntaxNode
@@ -823,37 +823,37 @@ public struct PatternSyntax: PatternSyntaxProtocol, SyntaxHashable {
823
823
public let _syntaxNode : Syntax
824
824
825
825
/// Create a ``PatternSyntax`` node from a specialized syntax node.
826
- public init ( _ syntax: some PatternSyntaxProtocol ) {
826
+ public init ( _ syntax: __shared some PatternSyntaxProtocol ) {
827
827
// We know this cast is going to succeed. Go through init(_: SyntaxData)
828
828
// to do a sanity check and verify the kind matches in debug builds and get
829
829
// maximum performance in release builds.
830
830
self = Syntax ( syntax) . cast ( Self . self)
831
831
}
832
832
833
833
/// Create a ``PatternSyntax`` node from a specialized optional syntax node.
834
- public init ? ( _ syntax: ( some PatternSyntaxProtocol ) ? ) {
834
+ public init ? ( _ syntax: __shared ( some PatternSyntaxProtocol ) ? ) {
835
835
guard let syntax = syntax else {
836
836
return nil
837
837
}
838
838
self . init ( syntax)
839
839
}
840
840
841
- public init ( fromProtocol syntax: PatternSyntaxProtocol ) {
841
+ public init ( fromProtocol syntax: __shared PatternSyntaxProtocol) {
842
842
// We know this cast is going to succeed. Go through init(_: SyntaxData)
843
843
// to do a sanity check and verify the kind matches in debug builds and get
844
844
// maximum performance in release builds.
845
845
self = Syntax ( syntax) . cast ( Self . self)
846
846
}
847
847
848
848
/// Create a ``PatternSyntax`` node from a specialized optional syntax node.
849
- public init ? ( fromProtocol syntax: PatternSyntaxProtocol ? ) {
849
+ public init ? ( fromProtocol syntax: __shared PatternSyntaxProtocol? ) {
850
850
guard let syntax = syntax else {
851
851
return nil
852
852
}
853
853
self . init ( fromProtocol: syntax)
854
854
}
855
855
856
- public init ? ( _ node: some SyntaxProtocol ) {
856
+ public init ? ( _ node: __shared some SyntaxProtocol ) {
857
857
switch node. raw. kind {
858
858
case . expressionPattern, . identifierPattern, . isTypePattern, . missingPattern, . tuplePattern, . valueBindingPattern, . wildcardPattern:
859
859
self . _syntaxNode = node. _syntaxNode
@@ -1099,37 +1099,37 @@ public struct StmtSyntax: StmtSyntaxProtocol, SyntaxHashable {
1099
1099
public let _syntaxNode : Syntax
1100
1100
1101
1101
/// Create a ``StmtSyntax`` node from a specialized syntax node.
1102
- public init ( _ syntax: some StmtSyntaxProtocol ) {
1102
+ public init ( _ syntax: __shared some StmtSyntaxProtocol ) {
1103
1103
// We know this cast is going to succeed. Go through init(_: SyntaxData)
1104
1104
// to do a sanity check and verify the kind matches in debug builds and get
1105
1105
// maximum performance in release builds.
1106
1106
self = Syntax ( syntax) . cast ( Self . self)
1107
1107
}
1108
1108
1109
1109
/// Create a ``StmtSyntax`` node from a specialized optional syntax node.
1110
- public init ? ( _ syntax: ( some StmtSyntaxProtocol ) ? ) {
1110
+ public init ? ( _ syntax: __shared ( some StmtSyntaxProtocol ) ? ) {
1111
1111
guard let syntax = syntax else {
1112
1112
return nil
1113
1113
}
1114
1114
self . init ( syntax)
1115
1115
}
1116
1116
1117
- public init ( fromProtocol syntax: StmtSyntaxProtocol ) {
1117
+ public init ( fromProtocol syntax: __shared StmtSyntaxProtocol) {
1118
1118
// We know this cast is going to succeed. Go through init(_: SyntaxData)
1119
1119
// to do a sanity check and verify the kind matches in debug builds and get
1120
1120
// maximum performance in release builds.
1121
1121
self = Syntax ( syntax) . cast ( Self . self)
1122
1122
}
1123
1123
1124
1124
/// Create a ``StmtSyntax`` node from a specialized optional syntax node.
1125
- public init ? ( fromProtocol syntax: StmtSyntaxProtocol ? ) {
1125
+ public init ? ( fromProtocol syntax: __shared StmtSyntaxProtocol? ) {
1126
1126
guard let syntax = syntax else {
1127
1127
return nil
1128
1128
}
1129
1129
self . init ( fromProtocol: syntax)
1130
1130
}
1131
1131
1132
- public init ? ( _ node: some SyntaxProtocol ) {
1132
+ public init ? ( _ node: __shared some SyntaxProtocol ) {
1133
1133
switch node. raw. kind {
1134
1134
case . breakStmt, . continueStmt, . deferStmt, . discardStmt, . doStmt, . expressionStmt, . fallThroughStmt, . forStmt, . guardStmt, . labeledStmt, . missingStmt, . repeatStmt, . returnStmt, . thenStmt, . throwStmt, . whileStmt, . yieldStmt:
1135
1135
self . _syntaxNode = node. _syntaxNode
@@ -1387,37 +1387,37 @@ public struct TypeSyntax: TypeSyntaxProtocol, SyntaxHashable {
1387
1387
public let _syntaxNode : Syntax
1388
1388
1389
1389
/// Create a ``TypeSyntax`` node from a specialized syntax node.
1390
- public init ( _ syntax: some TypeSyntaxProtocol ) {
1390
+ public init ( _ syntax: __shared some TypeSyntaxProtocol ) {
1391
1391
// We know this cast is going to succeed. Go through init(_: SyntaxData)
1392
1392
// to do a sanity check and verify the kind matches in debug builds and get
1393
1393
// maximum performance in release builds.
1394
1394
self = Syntax ( syntax) . cast ( Self . self)
1395
1395
}
1396
1396
1397
1397
/// Create a ``TypeSyntax`` node from a specialized optional syntax node.
1398
- public init ? ( _ syntax: ( some TypeSyntaxProtocol ) ? ) {
1398
+ public init ? ( _ syntax: __shared ( some TypeSyntaxProtocol ) ? ) {
1399
1399
guard let syntax = syntax else {
1400
1400
return nil
1401
1401
}
1402
1402
self . init ( syntax)
1403
1403
}
1404
1404
1405
- public init ( fromProtocol syntax: TypeSyntaxProtocol ) {
1405
+ public init ( fromProtocol syntax: __shared TypeSyntaxProtocol) {
1406
1406
// We know this cast is going to succeed. Go through init(_: SyntaxData)
1407
1407
// to do a sanity check and verify the kind matches in debug builds and get
1408
1408
// maximum performance in release builds.
1409
1409
self = Syntax ( syntax) . cast ( Self . self)
1410
1410
}
1411
1411
1412
1412
/// Create a ``TypeSyntax`` node from a specialized optional syntax node.
1413
- public init ? ( fromProtocol syntax: TypeSyntaxProtocol ? ) {
1413
+ public init ? ( fromProtocol syntax: __shared TypeSyntaxProtocol? ) {
1414
1414
guard let syntax = syntax else {
1415
1415
return nil
1416
1416
}
1417
1417
self . init ( fromProtocol: syntax)
1418
1418
}
1419
1419
1420
- public init ? ( _ node: some SyntaxProtocol ) {
1420
+ public init ? ( _ node: __shared some SyntaxProtocol ) {
1421
1421
switch node. raw. kind {
1422
1422
case . arrayType, . attributedType, . classRestrictionType, . compositionType, . dictionaryType, . functionType, . identifierType, . implicitlyUnwrappedOptionalType, . memberType, . metatypeType, . missingType, . namedOpaqueReturnType, . optionalType, . packElementType, . packExpansionType, . someOrAnyType, . suppressedType, . tupleType:
1423
1423
self . _syntaxNode = node. _syntaxNode
0 commit comments