diff --git a/CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/SyntaxBaseNodesFile.swift b/CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/SyntaxBaseNodesFile.swift index 762e70c77ec..6125a3a9224 100644 --- a/CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/SyntaxBaseNodesFile.swift +++ b/CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/SyntaxBaseNodesFile.swift @@ -183,7 +183,7 @@ let syntaxBaseNodesFile = SourceFileSyntax(leadingTrivia: copyrightHeader) { DeclSyntax( """ /// Create a \(raw: node.kind.doccLink) node from a specialized syntax node. - public init(_ syntax: some \(node.kind.protocolType)) { + public init(_ syntax: __shared some \(node.kind.protocolType)) { // We know this cast is going to succeed. Go through init(_: SyntaxData) // to do a sanity check and verify the kind matches in debug builds and get // maximum performance in release builds. @@ -195,7 +195,7 @@ let syntaxBaseNodesFile = SourceFileSyntax(leadingTrivia: copyrightHeader) { DeclSyntax( """ /// Create a \(raw: node.kind.doccLink) node from a specialized optional syntax node. - public init?(_ syntax: (some \(node.kind.protocolType))?) { + public init?(_ syntax: __shared (some \(node.kind.protocolType))?) { guard let syntax = syntax else { return nil } self.init(syntax) } @@ -204,7 +204,7 @@ let syntaxBaseNodesFile = SourceFileSyntax(leadingTrivia: copyrightHeader) { DeclSyntax( """ - public init(fromProtocol syntax: \(node.kind.protocolType)) { + public init(fromProtocol syntax: __shared \(node.kind.protocolType)) { // We know this cast is going to succeed. Go through init(_: SyntaxData) // to do a sanity check and verify the kind matches in debug builds and get // maximum performance in release builds. @@ -216,14 +216,14 @@ let syntaxBaseNodesFile = SourceFileSyntax(leadingTrivia: copyrightHeader) { DeclSyntax( """ /// Create a \(raw: node.kind.doccLink) node from a specialized optional syntax node. - public init?(fromProtocol syntax: \(node.kind.protocolType)?) { + public init?(fromProtocol syntax: __shared \(node.kind.protocolType)?) { guard let syntax = syntax else { return nil } self.init(fromProtocol: syntax) } """ ) - try InitializerDeclSyntax("public init?(_ node: some SyntaxProtocol)") { + try InitializerDeclSyntax("public init?(_ node: __shared some SyntaxProtocol)") { try SwitchExprSyntax("switch node.raw.kind") { SwitchCaseListSyntax { SwitchCaseSyntax( diff --git a/CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/SyntaxNodesFile.swift b/CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/SyntaxNodesFile.swift index f983a49ed9f..1be9908fc79 100644 --- a/CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/SyntaxNodesFile.swift +++ b/CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/SyntaxNodesFile.swift @@ -47,7 +47,7 @@ func syntaxNode(nodesStartingWith: [Character]) -> SourceFileSyntax { DeclSyntax( """ - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .\(node.varOrCaseName) else { return nil } self._syntaxNode = node._syntaxNode } @@ -256,7 +256,7 @@ private func generateSyntaxChildChoices(for child: Child) throws -> EnumDeclSynt } } - try! InitializerDeclSyntax("public init?(_ node: some SyntaxProtocol)") { + try! InitializerDeclSyntax("public init?(_ node: __shared some SyntaxProtocol)") { for choice in choices { StmtSyntax( """ diff --git a/Sources/SwiftSyntax/SyntaxChildren.swift b/Sources/SwiftSyntax/SyntaxChildren.swift index 9b18396c65a..5457797679a 100644 --- a/Sources/SwiftSyntax/SyntaxChildren.swift +++ b/Sources/SwiftSyntax/SyntaxChildren.swift @@ -274,7 +274,7 @@ struct RawSyntaxChildren: BidirectionalCollection, Sendable { } } - init(_ base: Syntax) { + init(_ base: __shared Syntax) { self.init(base.absoluteRaw) } } diff --git a/Sources/SwiftSyntax/SyntaxProtocol.swift b/Sources/SwiftSyntax/SyntaxProtocol.swift index d2cc8d58129..07c5f7b3077 100644 --- a/Sources/SwiftSyntax/SyntaxProtocol.swift +++ b/Sources/SwiftSyntax/SyntaxProtocol.swift @@ -24,7 +24,7 @@ public protocol SyntaxProtocol: CustomStringConvertible, /// Converts the given specialized node to this type. Returns `nil` if the /// conversion is not possible. - init?(_ node: some SyntaxProtocol) + init?(_ node: __shared some SyntaxProtocol) /// The statically allowed structure of the syntax node. static var structure: SyntaxNodeStructure { get } diff --git a/Sources/SwiftSyntax/generated/SyntaxBaseNodes.swift b/Sources/SwiftSyntax/generated/SyntaxBaseNodes.swift index b6c2d78d3d3..f0952b03ded 100644 --- a/Sources/SwiftSyntax/generated/SyntaxBaseNodes.swift +++ b/Sources/SwiftSyntax/generated/SyntaxBaseNodes.swift @@ -183,7 +183,7 @@ public struct DeclSyntax: DeclSyntaxProtocol, SyntaxHashable { public let _syntaxNode: Syntax /// Create a ``DeclSyntax`` node from a specialized syntax node. - public init(_ syntax: some DeclSyntaxProtocol) { + public init(_ syntax: __shared some DeclSyntaxProtocol) { // We know this cast is going to succeed. Go through init(_: SyntaxData) // to do a sanity check and verify the kind matches in debug builds and get // maximum performance in release builds. @@ -191,14 +191,14 @@ public struct DeclSyntax: DeclSyntaxProtocol, SyntaxHashable { } /// Create a ``DeclSyntax`` node from a specialized optional syntax node. - public init?(_ syntax: (some DeclSyntaxProtocol)?) { + public init?(_ syntax: __shared (some DeclSyntaxProtocol)?) { guard let syntax = syntax else { return nil } self.init(syntax) } - public init(fromProtocol syntax: DeclSyntaxProtocol) { + public init(fromProtocol syntax: __shared DeclSyntaxProtocol) { // We know this cast is going to succeed. Go through init(_: SyntaxData) // to do a sanity check and verify the kind matches in debug builds and get // maximum performance in release builds. @@ -206,14 +206,14 @@ public struct DeclSyntax: DeclSyntaxProtocol, SyntaxHashable { } /// Create a ``DeclSyntax`` node from a specialized optional syntax node. - public init?(fromProtocol syntax: DeclSyntaxProtocol?) { + public init?(fromProtocol syntax: __shared DeclSyntaxProtocol?) { guard let syntax = syntax else { return nil } self.init(fromProtocol: syntax) } - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { switch node.raw.kind { 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: self._syntaxNode = node._syntaxNode @@ -510,7 +510,7 @@ public struct ExprSyntax: ExprSyntaxProtocol, SyntaxHashable { public let _syntaxNode: Syntax /// Create a ``ExprSyntax`` node from a specialized syntax node. - public init(_ syntax: some ExprSyntaxProtocol) { + public init(_ syntax: __shared some ExprSyntaxProtocol) { // We know this cast is going to succeed. Go through init(_: SyntaxData) // to do a sanity check and verify the kind matches in debug builds and get // maximum performance in release builds. @@ -518,14 +518,14 @@ public struct ExprSyntax: ExprSyntaxProtocol, SyntaxHashable { } /// Create a ``ExprSyntax`` node from a specialized optional syntax node. - public init?(_ syntax: (some ExprSyntaxProtocol)?) { + public init?(_ syntax: __shared (some ExprSyntaxProtocol)?) { guard let syntax = syntax else { return nil } self.init(syntax) } - public init(fromProtocol syntax: ExprSyntaxProtocol) { + public init(fromProtocol syntax: __shared ExprSyntaxProtocol) { // We know this cast is going to succeed. Go through init(_: SyntaxData) // to do a sanity check and verify the kind matches in debug builds and get // maximum performance in release builds. @@ -533,14 +533,14 @@ public struct ExprSyntax: ExprSyntaxProtocol, SyntaxHashable { } /// Create a ``ExprSyntax`` node from a specialized optional syntax node. - public init?(fromProtocol syntax: ExprSyntaxProtocol?) { + public init?(fromProtocol syntax: __shared ExprSyntaxProtocol?) { guard let syntax = syntax else { return nil } self.init(fromProtocol: syntax) } - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { switch node.raw.kind { 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: self._syntaxNode = node._syntaxNode @@ -823,7 +823,7 @@ public struct PatternSyntax: PatternSyntaxProtocol, SyntaxHashable { public let _syntaxNode: Syntax /// Create a ``PatternSyntax`` node from a specialized syntax node. - public init(_ syntax: some PatternSyntaxProtocol) { + public init(_ syntax: __shared some PatternSyntaxProtocol) { // We know this cast is going to succeed. Go through init(_: SyntaxData) // to do a sanity check and verify the kind matches in debug builds and get // maximum performance in release builds. @@ -831,14 +831,14 @@ public struct PatternSyntax: PatternSyntaxProtocol, SyntaxHashable { } /// Create a ``PatternSyntax`` node from a specialized optional syntax node. - public init?(_ syntax: (some PatternSyntaxProtocol)?) { + public init?(_ syntax: __shared (some PatternSyntaxProtocol)?) { guard let syntax = syntax else { return nil } self.init(syntax) } - public init(fromProtocol syntax: PatternSyntaxProtocol) { + public init(fromProtocol syntax: __shared PatternSyntaxProtocol) { // We know this cast is going to succeed. Go through init(_: SyntaxData) // to do a sanity check and verify the kind matches in debug builds and get // maximum performance in release builds. @@ -846,14 +846,14 @@ public struct PatternSyntax: PatternSyntaxProtocol, SyntaxHashable { } /// Create a ``PatternSyntax`` node from a specialized optional syntax node. - public init?(fromProtocol syntax: PatternSyntaxProtocol?) { + public init?(fromProtocol syntax: __shared PatternSyntaxProtocol?) { guard let syntax = syntax else { return nil } self.init(fromProtocol: syntax) } - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { switch node.raw.kind { case .expressionPattern, .identifierPattern, .isTypePattern, .missingPattern, .tuplePattern, .valueBindingPattern, .wildcardPattern: self._syntaxNode = node._syntaxNode @@ -1099,7 +1099,7 @@ public struct StmtSyntax: StmtSyntaxProtocol, SyntaxHashable { public let _syntaxNode: Syntax /// Create a ``StmtSyntax`` node from a specialized syntax node. - public init(_ syntax: some StmtSyntaxProtocol) { + public init(_ syntax: __shared some StmtSyntaxProtocol) { // We know this cast is going to succeed. Go through init(_: SyntaxData) // to do a sanity check and verify the kind matches in debug builds and get // maximum performance in release builds. @@ -1107,14 +1107,14 @@ public struct StmtSyntax: StmtSyntaxProtocol, SyntaxHashable { } /// Create a ``StmtSyntax`` node from a specialized optional syntax node. - public init?(_ syntax: (some StmtSyntaxProtocol)?) { + public init?(_ syntax: __shared (some StmtSyntaxProtocol)?) { guard let syntax = syntax else { return nil } self.init(syntax) } - public init(fromProtocol syntax: StmtSyntaxProtocol) { + public init(fromProtocol syntax: __shared StmtSyntaxProtocol) { // We know this cast is going to succeed. Go through init(_: SyntaxData) // to do a sanity check and verify the kind matches in debug builds and get // maximum performance in release builds. @@ -1122,14 +1122,14 @@ public struct StmtSyntax: StmtSyntaxProtocol, SyntaxHashable { } /// Create a ``StmtSyntax`` node from a specialized optional syntax node. - public init?(fromProtocol syntax: StmtSyntaxProtocol?) { + public init?(fromProtocol syntax: __shared StmtSyntaxProtocol?) { guard let syntax = syntax else { return nil } self.init(fromProtocol: syntax) } - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { switch node.raw.kind { case .breakStmt, .continueStmt, .deferStmt, .discardStmt, .doStmt, .expressionStmt, .fallThroughStmt, .forStmt, .guardStmt, .labeledStmt, .missingStmt, .repeatStmt, .returnStmt, .thenStmt, .throwStmt, .whileStmt, .yieldStmt: self._syntaxNode = node._syntaxNode @@ -1387,7 +1387,7 @@ public struct TypeSyntax: TypeSyntaxProtocol, SyntaxHashable { public let _syntaxNode: Syntax /// Create a ``TypeSyntax`` node from a specialized syntax node. - public init(_ syntax: some TypeSyntaxProtocol) { + public init(_ syntax: __shared some TypeSyntaxProtocol) { // We know this cast is going to succeed. Go through init(_: SyntaxData) // to do a sanity check and verify the kind matches in debug builds and get // maximum performance in release builds. @@ -1395,14 +1395,14 @@ public struct TypeSyntax: TypeSyntaxProtocol, SyntaxHashable { } /// Create a ``TypeSyntax`` node from a specialized optional syntax node. - public init?(_ syntax: (some TypeSyntaxProtocol)?) { + public init?(_ syntax: __shared (some TypeSyntaxProtocol)?) { guard let syntax = syntax else { return nil } self.init(syntax) } - public init(fromProtocol syntax: TypeSyntaxProtocol) { + public init(fromProtocol syntax: __shared TypeSyntaxProtocol) { // We know this cast is going to succeed. Go through init(_: SyntaxData) // to do a sanity check and verify the kind matches in debug builds and get // maximum performance in release builds. @@ -1410,14 +1410,14 @@ public struct TypeSyntax: TypeSyntaxProtocol, SyntaxHashable { } /// Create a ``TypeSyntax`` node from a specialized optional syntax node. - public init?(fromProtocol syntax: TypeSyntaxProtocol?) { + public init?(fromProtocol syntax: __shared TypeSyntaxProtocol?) { guard let syntax = syntax else { return nil } self.init(fromProtocol: syntax) } - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { switch node.raw.kind { case .arrayType, .attributedType, .classRestrictionType, .compositionType, .dictionaryType, .functionType, .identifierType, .implicitlyUnwrappedOptionalType, .memberType, .metatypeType, .missingType, .namedOpaqueReturnType, .optionalType, .packElementType, .packExpansionType, .someOrAnyType, .suppressedType, .tupleType: self._syntaxNode = node._syntaxNode diff --git a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesAB.swift b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesAB.swift index 88645b6cba8..f00c606509a 100644 --- a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesAB.swift +++ b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesAB.swift @@ -46,7 +46,7 @@ public struct AccessorBlockSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNo self = .getter(node) } - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { if let node = node.as(AccessorDeclListSyntax.self) { self = .accessors(node) return @@ -109,7 +109,7 @@ public struct AccessorBlockSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNo public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .accessorBlock else { return nil } @@ -268,7 +268,7 @@ public struct AccessorBlockSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNo public struct AccessorDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .accessorDecl else { return nil } @@ -532,7 +532,7 @@ public struct AccessorDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclS public struct AccessorEffectSpecifiersSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .accessorEffectSpecifiers else { return nil } @@ -658,7 +658,7 @@ public struct AccessorEffectSpecifiersSyntax: SyntaxProtocol, SyntaxHashable, _L public struct AccessorParametersSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .accessorParameters else { return nil } @@ -812,7 +812,7 @@ public struct AccessorParametersSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyn public struct ActorDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .actorDecl else { return nil } @@ -1159,7 +1159,7 @@ public struct ActorDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSynt public struct ArrayElementSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .arrayElement else { return nil } @@ -1278,7 +1278,7 @@ public struct ArrayElementSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNod public struct ArrayExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .arrayExpr else { return nil } @@ -1451,7 +1451,7 @@ public struct ArrayExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSynt public struct ArrayTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .arrayType else { return nil } @@ -1606,7 +1606,7 @@ public struct ArrayTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeSynt public struct ArrowExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .arrowExpr else { return nil } @@ -1739,7 +1739,7 @@ public struct ArrowExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSynt public struct AsExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .asExpr else { return nil } @@ -1911,7 +1911,7 @@ public struct AsExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxN public struct AssignmentExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .assignmentExpr else { return nil } @@ -2020,7 +2020,7 @@ public struct AssignmentExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExp public struct AssociatedTypeDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .associatedTypeDecl else { return nil } @@ -2494,7 +2494,7 @@ public struct AttributeSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodePr self = .documentationArguments(node) } - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { if let node = node.as(LabeledExprListSyntax.self) { self = .argumentList(node) return @@ -3046,7 +3046,7 @@ public struct AttributeSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodePr public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .attribute else { return nil } @@ -3263,7 +3263,7 @@ public struct AttributeSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodePr public struct AttributedTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .attributedType else { return nil } @@ -3494,7 +3494,7 @@ public struct AvailabilityArgumentSyntax: SyntaxProtocol, SyntaxHashable, _LeafS self = .availabilityLabeledArgument(node) } - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { if let node = node.as(TokenSyntax.self) { self = .token(node) return @@ -3583,7 +3583,7 @@ public struct AvailabilityArgumentSyntax: SyntaxProtocol, SyntaxHashable, _LeafS public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .availabilityArgument else { return nil } @@ -3710,7 +3710,7 @@ public struct AvailabilityArgumentSyntax: SyntaxProtocol, SyntaxHashable, _LeafS public struct AvailabilityConditionSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .availabilityCondition else { return nil } @@ -3939,7 +3939,7 @@ public struct AvailabilityLabeledArgumentSyntax: SyntaxProtocol, SyntaxHashable, self = .version(node) } - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { if let node = node.as(SimpleStringLiteralExprSyntax.self) { self = .string(node) return @@ -4002,7 +4002,7 @@ public struct AvailabilityLabeledArgumentSyntax: SyntaxProtocol, SyntaxHashable, public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .availabilityLabeledArgument else { return nil } @@ -4160,7 +4160,7 @@ public struct AvailabilityLabeledArgumentSyntax: SyntaxProtocol, SyntaxHashable, public struct AwaitExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .awaitExpr else { return nil } @@ -4283,7 +4283,7 @@ public struct AwaitExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSynt public struct BackDeployedAttributeArgumentsSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .backDeployedAttributeArguments else { return nil } @@ -4468,7 +4468,7 @@ public struct BackDeployedAttributeArgumentsSyntax: SyntaxProtocol, SyntaxHashab public struct BinaryOperatorExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .binaryOperatorExpr else { return nil } @@ -4545,7 +4545,7 @@ public struct BinaryOperatorExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _Lea public struct BooleanLiteralExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .booleanLiteralExpr else { return nil } @@ -4625,7 +4625,7 @@ public struct BooleanLiteralExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _Lea public struct BorrowExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .borrowExpr else { return nil } @@ -4741,7 +4741,7 @@ public struct BorrowExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyn public struct BreakStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .breakStmt else { return nil } diff --git a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesC.swift b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesC.swift index 212b4d2e43f..d50bae00088 100644 --- a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesC.swift +++ b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesC.swift @@ -24,7 +24,7 @@ public struct _CanImportExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == ._canImportExpr else { return nil } @@ -233,7 +233,7 @@ public struct _CanImportExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExp public struct _CanImportVersionInfoSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == ._canImportVersionInfo else { return nil } @@ -414,7 +414,7 @@ public struct _CanImportVersionInfoSyntax: ExprSyntaxProtocol, SyntaxHashable, _ public struct CatchClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .catchClause else { return nil } @@ -588,7 +588,7 @@ public struct CatchClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNode public struct CatchItemSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .catchItem else { return nil } @@ -760,7 +760,7 @@ public struct CatchItemSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodePr public struct ClassDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .classDecl else { return nil } @@ -1106,7 +1106,7 @@ public struct ClassDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSynt public struct ClassRestrictionTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .classRestrictionType else { return nil } @@ -1189,7 +1189,7 @@ public struct ClassRestrictionTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _L public struct ClosureCaptureClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .closureCaptureClause else { return nil } @@ -1367,7 +1367,7 @@ public struct ClosureCaptureClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafS public struct ClosureCaptureSpecifierSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .closureCaptureSpecifier else { return nil } @@ -1555,7 +1555,7 @@ public struct ClosureCaptureSpecifierSyntax: SyntaxProtocol, SyntaxHashable, _Le public struct ClosureCaptureSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .closureCapture else { return nil } @@ -1765,7 +1765,7 @@ public struct ClosureCaptureSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxN public struct ClosureExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .closureExpr else { return nil } @@ -1968,7 +1968,7 @@ public struct ClosureExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSy public struct ClosureParameterClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .closureParameterClause else { return nil } @@ -2158,7 +2158,7 @@ public struct ClosureParameterClauseSyntax: SyntaxProtocol, SyntaxHashable, _Lea public struct ClosureParameterSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .closureParameter else { return nil } @@ -2521,7 +2521,7 @@ public struct ClosureParameterSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynta public struct ClosureShorthandParameterSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .closureShorthandParameter else { return nil } @@ -2669,7 +2669,7 @@ public struct ClosureSignatureSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynta self = .parameterClause(node) } - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { if let node = node.as(ClosureShorthandParameterListSyntax.self) { self = .simpleInput(node) return @@ -2732,7 +2732,7 @@ public struct ClosureSignatureSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynta public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .closureSignature else { return nil } @@ -3011,7 +3011,7 @@ public struct CodeBlockItemSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNo self = .expr(ExprSyntax(node)) } - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { if let node = node.as(DeclSyntax.self) { self = .decl(node) return @@ -3100,7 +3100,7 @@ public struct CodeBlockItemSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNo public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .codeBlockItem else { return nil } @@ -3238,7 +3238,7 @@ public struct CodeBlockItemSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNo public struct CodeBlockSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .codeBlock else { return nil } @@ -3420,7 +3420,7 @@ public struct CodeBlockSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodePr public struct CompositionTypeElementSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .compositionTypeElement else { return nil } @@ -3532,7 +3532,7 @@ public struct CompositionTypeElementSyntax: SyntaxProtocol, SyntaxHashable, _Lea public struct CompositionTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .compositionType else { return nil } @@ -3671,7 +3671,7 @@ public struct ConditionElementSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynta self = .optionalBinding(node) } - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { if let node = node.as(ExprSyntax.self) { self = .expression(node) return @@ -3791,7 +3791,7 @@ public struct ConditionElementSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynta public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .conditionElement else { return nil } @@ -3912,7 +3912,7 @@ public struct ConditionElementSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynta public struct ConformanceRequirementSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .conformanceRequirement else { return nil } @@ -4054,7 +4054,7 @@ public struct ConformanceRequirementSyntax: SyntaxProtocol, SyntaxHashable, _Lea public struct ConsumeExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .consumeExpr else { return nil } @@ -4172,7 +4172,7 @@ public struct ConsumeExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSy public struct ContinueStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .continueStmt else { return nil } @@ -4300,7 +4300,7 @@ public struct ContinueStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtS public struct ConventionAttributeArgumentsSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .conventionAttributeArguments else { return nil } @@ -4513,7 +4513,7 @@ public struct ConventionAttributeArgumentsSyntax: SyntaxProtocol, SyntaxHashable public struct ConventionWitnessMethodAttributeArgumentsSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .conventionWitnessMethodAttributeArguments else { return nil } @@ -4670,7 +4670,7 @@ public struct ConventionWitnessMethodAttributeArgumentsSyntax: SyntaxProtocol, S public struct CopyExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .copyExpr else { return nil } diff --git a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesD.swift b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesD.swift index 4a696c7f568..2aacaf947d4 100644 --- a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesD.swift +++ b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesD.swift @@ -26,7 +26,7 @@ public struct DeclModifierDetailSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .declModifierDetail else { return nil } @@ -179,7 +179,7 @@ public struct DeclModifierDetailSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyn public struct DeclModifierSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .declModifier else { return nil } @@ -335,7 +335,7 @@ public struct DeclModifierSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNod public struct DeclNameArgumentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .declNameArgument else { return nil } @@ -456,7 +456,7 @@ public struct DeclNameArgumentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynta public struct DeclNameArgumentsSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .declNameArguments else { return nil } @@ -636,7 +636,7 @@ public struct DeclNameArgumentsSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynt public struct DeclReferenceExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .declReferenceExpr else { return nil } @@ -761,7 +761,7 @@ public struct DeclReferenceExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _Leaf public struct DeferStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .deferStmt else { return nil } @@ -889,7 +889,7 @@ public struct DeferStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSynt public struct DeinitializerDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .deinitializerDecl else { return nil } @@ -1149,7 +1149,7 @@ public struct DeinitializerDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _Leaf public struct DeinitializerEffectSpecifiersSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .deinitializerEffectSpecifiers else { return nil } @@ -1241,7 +1241,7 @@ public struct DeinitializerEffectSpecifiersSyntax: SyntaxProtocol, SyntaxHashabl public struct DerivativeAttributeArgumentsSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .derivativeAttributeArguments else { return nil } @@ -1519,7 +1519,7 @@ public struct DerivativeAttributeArgumentsSyntax: SyntaxProtocol, SyntaxHashable public struct DesignatedTypeSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .designatedType else { return nil } @@ -1643,7 +1643,7 @@ public struct DesignatedTypeSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxN public struct DictionaryElementSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .dictionaryElement else { return nil } @@ -1836,7 +1836,7 @@ public struct DictionaryExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExp self = .elements(node) } - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { if let node = node.as(TokenSyntax.self) { self = .colon(node) return @@ -1899,7 +1899,7 @@ public struct DictionaryExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExp public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .dictionaryExpr else { return nil } @@ -2047,7 +2047,7 @@ public struct DictionaryExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExp public struct DictionaryTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .dictionaryType else { return nil } @@ -2254,7 +2254,7 @@ public struct DictionaryTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTyp public struct DifferentiabilityArgumentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .differentiabilityArgument else { return nil } @@ -2383,7 +2383,7 @@ public struct DifferentiabilityArgumentSyntax: SyntaxProtocol, SyntaxHashable, _ public struct DifferentiabilityArgumentsSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .differentiabilityArguments else { return nil } @@ -2584,7 +2584,7 @@ public struct DifferentiabilityWithRespectToArgumentSyntax: SyntaxProtocol, Synt self = .argumentList(node) } - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { if let node = node.as(DifferentiabilityArgumentSyntax.self) { self = .argument(node) return @@ -2647,7 +2647,7 @@ public struct DifferentiabilityWithRespectToArgumentSyntax: SyntaxProtocol, Synt public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .differentiabilityWithRespectToArgument else { return nil } @@ -2807,7 +2807,7 @@ public struct DifferentiabilityWithRespectToArgumentSyntax: SyntaxProtocol, Synt public struct DifferentiableAttributeArgumentsSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .differentiableAttributeArguments else { return nil } @@ -3035,7 +3035,7 @@ public struct DifferentiableAttributeArgumentsSyntax: SyntaxProtocol, SyntaxHash public struct DiscardAssignmentExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .discardAssignmentExpr else { return nil } @@ -3113,7 +3113,7 @@ public struct DiscardAssignmentExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _ public struct DiscardStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .discardStmt else { return nil } @@ -3257,7 +3257,7 @@ public struct DiscardStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSy public struct DoExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .doExpr else { return nil } @@ -3428,7 +3428,7 @@ public struct DoExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxN public struct DoStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .doStmt else { return nil } @@ -3650,7 +3650,7 @@ public struct DocumentationAttributeArgumentSyntax: SyntaxProtocol, SyntaxHashab self = .string(node) } - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { if let node = node.as(TokenSyntax.self) { self = .token(node) return @@ -3713,7 +3713,7 @@ public struct DocumentationAttributeArgumentSyntax: SyntaxProtocol, SyntaxHashab public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .documentationAttributeArgument else { return nil } @@ -3899,7 +3899,7 @@ public struct DocumentationAttributeArgumentSyntax: SyntaxProtocol, SyntaxHashab public struct DynamicReplacementAttributeArgumentsSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .dynamicReplacementAttributeArguments else { return nil } diff --git a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesEF.swift b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesEF.swift index 9f14c00ce19..c20344e4657 100644 --- a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesEF.swift +++ b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesEF.swift @@ -26,7 +26,7 @@ public struct EditorPlaceholderDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .editorPlaceholderDecl else { return nil } @@ -230,7 +230,7 @@ public struct EditorPlaceholderDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _ public struct EditorPlaceholderExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .editorPlaceholderExpr else { return nil } @@ -312,7 +312,7 @@ public struct EditorPlaceholderExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _ public struct EnumCaseDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .enumCaseDecl else { return nil } @@ -578,7 +578,7 @@ public struct EnumCaseDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclS public struct EnumCaseElementSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .enumCaseElement else { return nil } @@ -764,7 +764,7 @@ public struct EnumCaseElementSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntax public struct EnumCaseParameterClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .enumCaseParameterClause else { return nil } @@ -953,7 +953,7 @@ public struct EnumCaseParameterClauseSyntax: SyntaxProtocol, SyntaxHashable, _Le public struct EnumCaseParameterSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .enumCaseParameter else { return nil } @@ -1257,7 +1257,7 @@ public struct EnumCaseParameterSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynt public struct EnumDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .enumDecl else { return nil } @@ -1611,7 +1611,7 @@ public struct EnumDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSynta public struct ExposeAttributeArgumentsSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .exposeAttributeArguments else { return nil } @@ -1766,7 +1766,7 @@ public struct ExposeAttributeArgumentsSyntax: SyntaxProtocol, SyntaxHashable, _L public struct ExpressionPatternSyntax: PatternSyntaxProtocol, SyntaxHashable, _LeafPatternSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .expressionPattern else { return nil } @@ -1852,7 +1852,7 @@ public struct ExpressionPatternSyntax: PatternSyntaxProtocol, SyntaxHashable, _L public struct ExpressionSegmentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .expressionSegment else { return nil } @@ -2081,7 +2081,7 @@ public struct ExpressionSegmentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynt public struct ExpressionStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .expressionStmt else { return nil } @@ -2173,7 +2173,7 @@ public struct ExpressionStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStm public struct ExtensionDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .extensionDecl else { return nil } @@ -2495,7 +2495,7 @@ public struct ExtensionDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDecl public struct FallThroughStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .fallThroughStmt else { return nil } @@ -2572,7 +2572,7 @@ public struct FallThroughStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafSt public struct FloatLiteralExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .floatLiteralExpr else { return nil } @@ -2658,7 +2658,7 @@ public struct FloatLiteralExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafE public struct ForStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .forStmt else { return nil } @@ -2994,7 +2994,7 @@ public struct ForStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSyntax public struct ForceUnwrapExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .forceUnwrapExpr else { return nil } @@ -3114,7 +3114,7 @@ public struct ForceUnwrapExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafEx public struct FunctionCallExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .functionCallExpr else { return nil } @@ -3417,7 +3417,7 @@ public struct FunctionCallExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafE public struct FunctionDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .functionDecl else { return nil } @@ -3772,7 +3772,7 @@ public struct FunctionDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclS public struct FunctionEffectSpecifiersSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .functionEffectSpecifiers else { return nil } @@ -3901,7 +3901,7 @@ public struct FunctionEffectSpecifiersSyntax: SyntaxProtocol, SyntaxHashable, _L public struct FunctionParameterClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .functionParameterClause else { return nil } @@ -4086,7 +4086,7 @@ public struct FunctionParameterClauseSyntax: SyntaxProtocol, SyntaxHashable, _Le public struct FunctionParameterSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .functionParameter else { return nil } @@ -4486,7 +4486,7 @@ public struct FunctionParameterSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynt public struct FunctionSignatureSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .functionSignature else { return nil } @@ -4634,7 +4634,7 @@ public struct FunctionSignatureSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynt public struct FunctionTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .functionType else { return nil } diff --git a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesGHI.swift b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesGHI.swift index 6c968b558dc..4b914525268 100644 --- a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesGHI.swift +++ b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesGHI.swift @@ -31,7 +31,7 @@ public struct GenericArgumentClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .genericArgumentClause else { return nil } @@ -207,7 +207,7 @@ public struct GenericArgumentClauseSyntax: SyntaxProtocol, SyntaxHashable, _Leaf public struct GenericArgumentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .genericArgument else { return nil } @@ -340,7 +340,7 @@ public struct GenericArgumentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntax public struct GenericParameterClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .genericParameterClause else { return nil } @@ -556,7 +556,7 @@ public struct GenericParameterClauseSyntax: SyntaxProtocol, SyntaxHashable, _Lea public struct GenericParameterSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .genericParameter else { return nil } @@ -842,7 +842,7 @@ public struct GenericRequirementSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyn self = .layoutRequirement(node) } - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { if let node = node.as(SameTypeRequirementSyntax.self) { self = .sameTypeRequirement(node) return @@ -931,7 +931,7 @@ public struct GenericRequirementSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyn public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .genericRequirement else { return nil } @@ -1047,7 +1047,7 @@ public struct GenericRequirementSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyn public struct GenericSpecializationExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .genericSpecializationExpr else { return nil } @@ -1180,7 +1180,7 @@ public struct GenericSpecializationExprSyntax: ExprSyntaxProtocol, SyntaxHashabl public struct GenericWhereClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .genericWhereClause else { return nil } @@ -1330,7 +1330,7 @@ public struct GenericWhereClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyn public struct GuardStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .guardStmt else { return nil } @@ -1538,7 +1538,7 @@ public struct GuardStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSynt public struct IdentifierPatternSyntax: PatternSyntaxProtocol, SyntaxHashable, _LeafPatternSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .identifierPattern else { return nil } @@ -1621,7 +1621,7 @@ public struct IdentifierPatternSyntax: PatternSyntaxProtocol, SyntaxHashable, _L public struct IdentifierTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .identifierType else { return nil } @@ -1786,7 +1786,7 @@ public struct IfConfigClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxN self = .attributes(node) } - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { if let node = node.as(CodeBlockItemListSyntax.self) { self = .statements(node) return @@ -1933,7 +1933,7 @@ public struct IfConfigClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxN public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .ifConfigClause else { return nil } @@ -2084,7 +2084,7 @@ public struct IfConfigClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxN public struct IfConfigDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .ifConfigDecl else { return nil } @@ -2253,7 +2253,7 @@ public struct IfExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxN self = .codeBlock(node) } - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { if let node = node.as(IfExprSyntax.self) { self = .ifExpr(node) return @@ -2316,7 +2316,7 @@ public struct IfExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxN public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .ifExpr else { return nil } @@ -2547,7 +2547,7 @@ public struct IfExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxN public struct ImplementsAttributeArgumentsSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .implementsAttributeArguments else { return nil } @@ -2696,7 +2696,7 @@ public struct ImplementsAttributeArgumentsSyntax: SyntaxProtocol, SyntaxHashable public struct ImplicitlyUnwrappedOptionalTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .implicitlyUnwrappedOptionalType else { return nil } @@ -2823,7 +2823,7 @@ public struct ImplicitlyUnwrappedOptionalTypeSyntax: TypeSyntaxProtocol, SyntaxH public struct ImportDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .importDecl else { return nil } @@ -3128,7 +3128,7 @@ public struct ImportDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyn public struct ImportPathComponentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .importPathComponent else { return nil } @@ -3253,7 +3253,7 @@ public struct ImportPathComponentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSy public struct InOutExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .inOutExpr else { return nil } @@ -3376,7 +3376,7 @@ public struct InOutExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSynt public struct InfixOperatorExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .infixOperatorExpr else { return nil } @@ -3525,7 +3525,7 @@ public struct InfixOperatorExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _Leaf public struct InheritanceClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .inheritanceClause else { return nil } @@ -3672,7 +3672,7 @@ public struct InheritanceClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynt public struct InheritedTypeSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .inheritedType else { return nil } @@ -3798,7 +3798,7 @@ public struct InheritedTypeSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNo public struct InitializerClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .initializerClause else { return nil } @@ -3931,7 +3931,7 @@ public struct InitializerClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynt public struct InitializerDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .initializerDecl else { return nil } @@ -4279,7 +4279,7 @@ public struct InitializerDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDe public struct IntegerLiteralExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .integerLiteralExpr else { return nil } @@ -4369,7 +4369,7 @@ public struct IntegerLiteralExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _Lea public struct IsExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .isExpr else { return nil } @@ -4518,7 +4518,7 @@ public struct IsExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxN public struct IsTypePatternSyntax: PatternSyntaxProtocol, SyntaxHashable, _LeafPatternSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .isTypePattern else { return nil } diff --git a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesJKLMN.swift b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesJKLMN.swift index 9db4ef199ab..f30a4f88a8b 100644 --- a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesJKLMN.swift +++ b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesJKLMN.swift @@ -53,7 +53,7 @@ public struct KeyPathComponentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynta self = .optional(node) } - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { if let node = node.as(KeyPathPropertyComponentSyntax.self) { self = .property(node) return @@ -142,7 +142,7 @@ public struct KeyPathComponentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynta public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .keyPathComponent else { return nil } @@ -267,7 +267,7 @@ public struct KeyPathComponentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynta public struct KeyPathExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .keyPathExpr else { return nil } @@ -441,7 +441,7 @@ public struct KeyPathExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSy public struct KeyPathOptionalComponentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .keyPathOptionalComponent else { return nil } @@ -527,7 +527,7 @@ public struct KeyPathOptionalComponentSyntax: SyntaxProtocol, SyntaxHashable, _L public struct KeyPathPropertyComponentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .keyPathPropertyComponent else { return nil } @@ -647,7 +647,7 @@ public struct KeyPathPropertyComponentSyntax: SyntaxProtocol, SyntaxHashable, _L public struct KeyPathSubscriptComponentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .keyPathSubscriptComponent else { return nil } @@ -831,7 +831,7 @@ public struct KeyPathSubscriptComponentSyntax: SyntaxProtocol, SyntaxHashable, _ public struct LabeledExprSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .labeledExpr else { return nil } @@ -1015,7 +1015,7 @@ public struct LabeledExprSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNode public struct LabeledSpecializeArgumentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .labeledSpecializeArgument else { return nil } @@ -1207,7 +1207,7 @@ public struct LabeledSpecializeArgumentSyntax: SyntaxProtocol, SyntaxHashable, _ public struct LabeledStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .labeledStmt else { return nil } @@ -1362,7 +1362,7 @@ public struct LabeledStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSy public struct LayoutRequirementSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .layoutRequirement else { return nil } @@ -1671,7 +1671,7 @@ public struct LayoutRequirementSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynt public struct LifetimeSpecifierArgumentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .lifetimeSpecifierArgument else { return nil } @@ -1813,7 +1813,7 @@ public struct LifetimeSpecifierArgumentSyntax: SyntaxProtocol, SyntaxHashable, _ public struct LifetimeTypeSpecifierSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .lifetimeTypeSpecifier else { return nil } @@ -2055,7 +2055,7 @@ public struct LifetimeTypeSpecifierSyntax: SyntaxProtocol, SyntaxHashable, _Leaf public struct MacroDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .macroDecl else { return nil } @@ -2398,7 +2398,7 @@ public struct MacroDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSynt public struct MacroExpansionDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .macroExpansionDecl else { return nil } @@ -2850,7 +2850,7 @@ public struct MacroExpansionDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _Lea public struct MacroExpansionExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .macroExpansionExpr else { return nil } @@ -3194,7 +3194,7 @@ public struct MacroExpansionExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _Lea public struct MatchingPatternConditionSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .matchingPatternCondition else { return nil } @@ -3365,7 +3365,7 @@ public struct MatchingPatternConditionSyntax: SyntaxProtocol, SyntaxHashable, _L public struct MemberAccessExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .memberAccessExpr else { return nil } @@ -3517,7 +3517,7 @@ public struct MemberAccessExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafE public struct MemberBlockItemSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .memberBlockItem else { return nil } @@ -3648,7 +3648,7 @@ public struct MemberBlockItemSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntax public struct MemberBlockSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .memberBlock else { return nil } @@ -3822,7 +3822,7 @@ public struct MemberBlockSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNode public struct MemberTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .memberType else { return nil } @@ -3996,7 +3996,7 @@ public struct MemberTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeSyn public struct MetatypeTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .metatypeType else { return nil } @@ -4146,7 +4146,7 @@ public struct MetatypeTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeS public struct MissingDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .missingDecl else { return nil } @@ -4352,7 +4352,7 @@ public struct MissingDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSy public struct MissingExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .missingExpr else { return nil } @@ -4436,7 +4436,7 @@ public struct MissingExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSy public struct MissingPatternSyntax: PatternSyntaxProtocol, SyntaxHashable, _LeafPatternSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .missingPattern else { return nil } @@ -4520,7 +4520,7 @@ public struct MissingPatternSyntax: PatternSyntaxProtocol, SyntaxHashable, _Leaf public struct MissingStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .missingStmt else { return nil } @@ -4604,7 +4604,7 @@ public struct MissingStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSy public struct MissingSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .missing else { return nil } @@ -4688,7 +4688,7 @@ public struct MissingSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProt public struct MissingTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .missingType else { return nil } @@ -4776,7 +4776,7 @@ public struct MissingTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeSy public struct MultipleTrailingClosureElementSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .multipleTrailingClosureElement else { return nil } @@ -4923,7 +4923,7 @@ public struct MultipleTrailingClosureElementSyntax: SyntaxProtocol, SyntaxHashab public struct NamedOpaqueReturnTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .namedOpaqueReturnType else { return nil } @@ -5037,7 +5037,7 @@ public struct NamedOpaqueReturnTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _ public struct NilLiteralExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .nilLiteralExpr else { return nil } diff --git a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesOP.swift b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesOP.swift index d27d33ced51..f95dcb38659 100644 --- a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesOP.swift +++ b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesOP.swift @@ -27,7 +27,7 @@ public struct ObjCSelectorPieceSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .objCSelectorPiece else { return nil } @@ -155,7 +155,7 @@ public struct ObjCSelectorPieceSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynt public struct OpaqueReturnTypeOfAttributeArgumentsSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .opaqueReturnTypeOfAttributeArguments else { return nil } @@ -309,7 +309,7 @@ public struct OpaqueReturnTypeOfAttributeArgumentsSyntax: SyntaxProtocol, Syntax public struct OperatorDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .operatorDecl else { return nil } @@ -501,7 +501,7 @@ public struct OperatorDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclS public struct OperatorPrecedenceAndTypesSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .operatorPrecedenceAndTypes else { return nil } @@ -684,7 +684,7 @@ public struct OperatorPrecedenceAndTypesSyntax: SyntaxProtocol, SyntaxHashable, public struct OptionalBindingConditionSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .optionalBindingCondition else { return nil } @@ -858,7 +858,7 @@ public struct OptionalBindingConditionSyntax: SyntaxProtocol, SyntaxHashable, _L public struct OptionalChainingExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .optionalChainingExpr else { return nil } @@ -974,7 +974,7 @@ public struct OptionalChainingExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _L public struct OptionalTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .optionalType else { return nil } @@ -1099,7 +1099,7 @@ public struct OptionalTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeS public struct OriginallyDefinedInAttributeArgumentsSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .originallyDefinedInAttributeArguments else { return nil } @@ -1328,7 +1328,7 @@ public struct OriginallyDefinedInAttributeArgumentsSyntax: SyntaxProtocol, Synta public struct PackElementExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .packElementExpr else { return nil } @@ -1444,7 +1444,7 @@ public struct PackElementExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafEx public struct PackElementTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .packElementType else { return nil } @@ -1562,7 +1562,7 @@ public struct PackElementTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTy public struct PackExpansionExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .packExpansionExpr else { return nil } @@ -1678,7 +1678,7 @@ public struct PackExpansionExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _Leaf public struct PackExpansionTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .packExpansionType else { return nil } @@ -1803,7 +1803,7 @@ public struct PackExpansionTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _Leaf public struct PatternBindingSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .patternBinding else { return nil } @@ -2016,7 +2016,7 @@ public struct PatternBindingSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxN public struct PatternExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .patternExpr else { return nil } @@ -2097,7 +2097,7 @@ public struct PatternExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSy public struct PlatformVersionItemSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .platformVersionItem else { return nil } @@ -2225,7 +2225,7 @@ public struct PlatformVersionItemSyntax: SyntaxProtocol, SyntaxHashable, _LeafSy public struct PlatformVersionSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .platformVersion else { return nil } @@ -2350,7 +2350,7 @@ public struct PlatformVersionSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntax public struct PostfixIfConfigExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .postfixIfConfigExpr else { return nil } @@ -2463,7 +2463,7 @@ public struct PostfixIfConfigExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _Le public struct PostfixOperatorExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .postfixOperatorExpr else { return nil } @@ -2588,7 +2588,7 @@ public struct PostfixOperatorExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _Le public struct PoundSourceLocationArgumentsSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .poundSourceLocationArguments else { return nil } @@ -2851,7 +2851,7 @@ public struct PoundSourceLocationArgumentsSyntax: SyntaxProtocol, SyntaxHashable public struct PoundSourceLocationSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .poundSourceLocation else { return nil } @@ -3032,7 +3032,7 @@ public struct PoundSourceLocationSyntax: DeclSyntaxProtocol, SyntaxHashable, _Le public struct PrecedenceGroupAssignmentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .precedenceGroupAssignment else { return nil } @@ -3192,7 +3192,7 @@ public struct PrecedenceGroupAssignmentSyntax: SyntaxProtocol, SyntaxHashable, _ public struct PrecedenceGroupAssociativitySyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .precedenceGroupAssociativity else { return nil } @@ -3353,7 +3353,7 @@ public struct PrecedenceGroupAssociativitySyntax: SyntaxProtocol, SyntaxHashable public struct PrecedenceGroupDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .precedenceGroupDecl else { return nil } @@ -3702,7 +3702,7 @@ public struct PrecedenceGroupDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _Le public struct PrecedenceGroupNameSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .precedenceGroupName else { return nil } @@ -3828,7 +3828,7 @@ public struct PrecedenceGroupNameSyntax: SyntaxProtocol, SyntaxHashable, _LeafSy public struct PrecedenceGroupRelationSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .precedenceGroupRelation else { return nil } @@ -4019,7 +4019,7 @@ public struct PrecedenceGroupRelationSyntax: SyntaxProtocol, SyntaxHashable, _Le public struct PrefixOperatorExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .prefixOperatorExpr else { return nil } @@ -4140,7 +4140,7 @@ public struct PrefixOperatorExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _Lea public struct PrimaryAssociatedTypeClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .primaryAssociatedTypeClause else { return nil } @@ -4316,7 +4316,7 @@ public struct PrimaryAssociatedTypeClauseSyntax: SyntaxProtocol, SyntaxHashable, public struct PrimaryAssociatedTypeSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .primaryAssociatedType else { return nil } @@ -4451,7 +4451,7 @@ public struct PrimaryAssociatedTypeSyntax: SyntaxProtocol, SyntaxHashable, _Leaf public struct ProtocolDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .protocolDecl else { return nil } diff --git a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesQRS.swift b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesQRS.swift index 8a4fc49dbdd..6325c3a5ead 100644 --- a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesQRS.swift +++ b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesQRS.swift @@ -24,7 +24,7 @@ public struct RegexLiteralExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .regexLiteralExpr else { return nil } @@ -232,7 +232,7 @@ public struct RegexLiteralExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafE public struct RepeatStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .repeatStmt else { return nil } @@ -410,7 +410,7 @@ public struct RepeatStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSyn public struct ReturnClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .returnClause else { return nil } @@ -531,7 +531,7 @@ public struct ReturnClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNod public struct ReturnStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .returnStmt else { return nil } @@ -652,7 +652,7 @@ public struct ReturnStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSyn public struct SameTypeRequirementSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .sameTypeRequirement else { return nil } @@ -804,7 +804,7 @@ public struct SameTypeRequirementSyntax: SyntaxProtocol, SyntaxHashable, _LeafSy public struct SequenceExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .sequenceExpr else { return nil } @@ -914,7 +914,7 @@ public struct SequenceExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprS public struct SimpleStringLiteralExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .simpleStringLiteralExpr else { return nil } @@ -1103,7 +1103,7 @@ public struct SimpleStringLiteralExprSyntax: ExprSyntaxProtocol, SyntaxHashable, public struct SimpleTypeSpecifierSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .simpleTypeSpecifier else { return nil } @@ -1192,7 +1192,7 @@ public struct SimpleTypeSpecifierSyntax: SyntaxProtocol, SyntaxHashable, _LeafSy public struct SomeOrAnyTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .someOrAnyType else { return nil } @@ -1311,7 +1311,7 @@ public struct SomeOrAnyTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafType public struct SourceFileSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .sourceFile else { return nil } @@ -1494,7 +1494,7 @@ public struct SourceFileSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeP public struct SpecializeAvailabilityArgumentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .specializeAvailabilityArgument else { return nil } @@ -1709,7 +1709,7 @@ public struct SpecializeAvailabilityArgumentSyntax: SyntaxProtocol, SyntaxHashab public struct SpecializeTargetFunctionArgumentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .specializeTargetFunctionArgument else { return nil } @@ -1916,7 +1916,7 @@ public struct SpecializeTargetFunctionArgumentSyntax: SyntaxProtocol, SyntaxHash public struct StringLiteralExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .stringLiteralExpr else { return nil } @@ -2160,7 +2160,7 @@ public struct StringLiteralExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _Leaf public struct StringSegmentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .stringSegment else { return nil } @@ -2302,7 +2302,7 @@ public struct StringSegmentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNo public struct StructDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .structDecl else { return nil } @@ -2653,7 +2653,7 @@ public struct StructDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyn public struct SubscriptCallExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .subscriptCallExpr else { return nil } @@ -2936,7 +2936,7 @@ public struct SubscriptCallExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _Leaf public struct SubscriptDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .subscriptDecl else { return nil } @@ -3265,7 +3265,7 @@ public struct SubscriptDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDecl public struct SuperExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .superExpr else { return nil } @@ -3343,7 +3343,7 @@ public struct SuperExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSynt public struct SuppressedTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .suppressedType else { return nil } @@ -3464,7 +3464,7 @@ public struct SuppressedTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTyp public struct SwitchCaseItemSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .switchCaseItem else { return nil } @@ -3611,7 +3611,7 @@ public struct SwitchCaseItemSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxN public struct SwitchCaseLabelSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .switchCaseLabel else { return nil } @@ -3807,7 +3807,7 @@ public struct SwitchCaseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeP self = .case(node) } - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { if let node = node.as(SwitchDefaultLabelSyntax.self) { self = .default(node) return @@ -3870,7 +3870,7 @@ public struct SwitchCaseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeP public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .switchCase else { return nil } @@ -4042,7 +4042,7 @@ public struct SwitchCaseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeP public struct SwitchDefaultLabelSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .switchDefaultLabel else { return nil } @@ -4177,7 +4177,7 @@ public struct SwitchDefaultLabelSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyn public struct SwitchExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .switchExpr else { return nil } diff --git a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesTUVWXYZ.swift b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesTUVWXYZ.swift index 4b77b1f534e..ea7884ddde3 100644 --- a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesTUVWXYZ.swift +++ b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesTUVWXYZ.swift @@ -35,7 +35,7 @@ public struct TernaryExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .ternaryExpr else { return nil } @@ -245,7 +245,7 @@ public struct TernaryExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSy public struct ThenStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .thenStmt else { return nil } @@ -361,7 +361,7 @@ public struct ThenStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSynta public struct ThrowStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .throwStmt else { return nil } @@ -486,7 +486,7 @@ public struct ThrowStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSynt public struct ThrowsClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .throwsClause else { return nil } @@ -690,7 +690,7 @@ public struct ThrowsClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNod public struct TryExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .tryExpr else { return nil } @@ -838,7 +838,7 @@ public struct TryExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntax public struct TupleExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .tupleExpr else { return nil } @@ -1018,7 +1018,7 @@ public struct TupleExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSynt public struct TuplePatternElementSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .tuplePatternElement else { return nil } @@ -1215,7 +1215,7 @@ public struct TuplePatternElementSyntax: SyntaxProtocol, SyntaxHashable, _LeafSy public struct TuplePatternSyntax: PatternSyntaxProtocol, SyntaxHashable, _LeafPatternSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .tuplePattern else { return nil } @@ -1402,7 +1402,7 @@ public struct TuplePatternSyntax: PatternSyntaxProtocol, SyntaxHashable, _LeafPa public struct TupleTypeElementSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .tupleTypeElement else { return nil } @@ -1668,7 +1668,7 @@ public struct TupleTypeElementSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynta public struct TupleTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .tupleType else { return nil } @@ -1845,7 +1845,7 @@ public struct TupleTypeSyntax: TypeSyntaxProtocol, SyntaxHashable, _LeafTypeSynt public struct TypeAliasDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .typeAliasDecl else { return nil } @@ -2159,7 +2159,7 @@ public struct TypeAliasDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDecl public struct TypeAnnotationSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .typeAnnotation else { return nil } @@ -2284,7 +2284,7 @@ public struct TypeAnnotationSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxN public struct TypeEffectSpecifiersSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .typeEffectSpecifiers else { return nil } @@ -2401,7 +2401,7 @@ public struct TypeEffectSpecifiersSyntax: SyntaxProtocol, SyntaxHashable, _LeafS public struct TypeExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .typeExpr else { return nil } @@ -2481,7 +2481,7 @@ public struct TypeExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSynta public struct TypeInitializerClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .typeInitializerClause else { return nil } @@ -2604,7 +2604,7 @@ public struct TypeInitializerClauseSyntax: SyntaxProtocol, SyntaxHashable, _Leaf public struct UnavailableFromAsyncAttributeArgumentsSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .unavailableFromAsyncAttributeArguments else { return nil } @@ -2756,7 +2756,7 @@ public struct UnavailableFromAsyncAttributeArgumentsSyntax: SyntaxProtocol, Synt public struct UnderscorePrivateAttributeArgumentsSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .underscorePrivateAttributeArguments else { return nil } @@ -2906,7 +2906,7 @@ public struct UnderscorePrivateAttributeArgumentsSyntax: SyntaxProtocol, SyntaxH public struct UnresolvedAsExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .unresolvedAsExpr else { return nil } @@ -3031,7 +3031,7 @@ public struct UnresolvedAsExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafE public struct UnresolvedIsExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .unresolvedIsExpr else { return nil } @@ -3116,7 +3116,7 @@ public struct UnresolvedIsExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafE public struct UnresolvedTernaryExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _LeafExprSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .unresolvedTernaryExpr else { return nil } @@ -3261,7 +3261,7 @@ public struct UnresolvedTernaryExprSyntax: ExprSyntaxProtocol, SyntaxHashable, _ public struct ValueBindingPatternSyntax: PatternSyntaxProtocol, SyntaxHashable, _LeafPatternSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .valueBindingPattern else { return nil } @@ -3391,7 +3391,7 @@ public struct ValueBindingPatternSyntax: PatternSyntaxProtocol, SyntaxHashable, public struct VariableDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .variableDecl else { return nil } @@ -3669,7 +3669,7 @@ public struct VariableDeclSyntax: DeclSyntaxProtocol, SyntaxHashable, _LeafDeclS public struct VersionComponentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .versionComponent else { return nil } @@ -3802,7 +3802,7 @@ public struct VersionComponentSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynta public struct VersionTupleSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .versionTuple else { return nil } @@ -3956,7 +3956,7 @@ public struct VersionTupleSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNod public struct WhereClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .whereClause else { return nil } @@ -4073,7 +4073,7 @@ public struct WhereClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNode public struct WhileStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .whileStmt else { return nil } @@ -4254,7 +4254,7 @@ public struct WhileStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSynt public struct WildcardPatternSyntax: PatternSyntaxProtocol, SyntaxHashable, _LeafPatternSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .wildcardPattern else { return nil } @@ -4351,7 +4351,7 @@ public struct YieldStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSynt self = .single(ExprSyntax(node)) } - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { if let node = node.as(YieldedExpressionsClauseSyntax.self) { self = .multiple(node) return @@ -4414,7 +4414,7 @@ public struct YieldStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSynt public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .yieldStmt else { return nil } @@ -4534,7 +4534,7 @@ public struct YieldStmtSyntax: StmtSyntaxProtocol, SyntaxHashable, _LeafStmtSynt public struct YieldedExpressionSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .yieldedExpression else { return nil } @@ -4655,7 +4655,7 @@ public struct YieldedExpressionSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynt public struct YieldedExpressionsClauseSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNodeProtocol { public let _syntaxNode: Syntax - public init?(_ node: some SyntaxProtocol) { + public init?(_ node: __shared some SyntaxProtocol) { guard node.raw.kind == .yieldedExpressionsClause else { return nil }