Skip to content

Commit f164c08

Browse files
committed
[generated] Re-generate generated code
1 parent 7c40c39 commit f164c08

20 files changed

+377
-2
lines changed

Sources/SwiftParser/generated/ExperimentalFeatures.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,7 @@ extension Parser.ExperimentalFeatures {
2929

3030
/// Whether to enable the parsing of 'then' statements.
3131
public static let thenStatements = Self(rawValue: 1 << 1)
32+
33+
/// Whether to enable the parsing of 'do' expressions.
34+
public static let doExpressions = Self(rawValue: 1 << 2)
3235
}

Sources/SwiftParserDiagnostics/generated/ChildNameForDiagnostics.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ private func childNameForDiagnostics(_ keyPath: AnyKeyPath) -> String? {
9292
return "value type"
9393
case \DifferentiabilityWithRespectToArgumentSyntax.arguments:
9494
return "arguments"
95+
case \DoExprSyntax.body:
96+
return "body"
9597
case \DoStmtSyntax.body:
9698
return "body"
9799
case \DocumentationAttributeArgumentSyntax.label:

Sources/SwiftParserDiagnostics/generated/SyntaxKindNameForDiagnostics.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ extension SyntaxKind {
131131
return "'@differentiable' arguments"
132132
case .discardStmt:
133133
return "'discard' statement"
134+
case .doExpr:
135+
return "'do' statement"
134136
case .doStmt:
135137
return "'do' statement"
136138
case .documentationAttributeArgumentList:

Sources/SwiftSyntax/Documentation.docc/generated/SwiftSyntax.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ These articles are intended for developers wishing to contribute to SwiftSyntax
110110
- <doc:SwiftSyntax/DeclReferenceExprSyntax>
111111
- <doc:SwiftSyntax/DictionaryExprSyntax>
112112
- <doc:SwiftSyntax/DiscardAssignmentExprSyntax>
113+
- <doc:SwiftSyntax/DoExprSyntax>
113114
- <doc:SwiftSyntax/EditorPlaceholderExprSyntax>
114115
- <doc:SwiftSyntax/FloatLiteralExprSyntax>
115116
- <doc:SwiftSyntax/ForceUnwrapExprSyntax>

Sources/SwiftSyntax/generated/ChildNameForKeyPath.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,6 +1011,20 @@ public func childName(_ keyPath: AnyKeyPath) -> String? {
10111011
return "expression"
10121012
case \DiscardStmtSyntax.unexpectedAfterExpression:
10131013
return "unexpectedAfterExpression"
1014+
case \DoExprSyntax.unexpectedBeforeDoKeyword:
1015+
return "unexpectedBeforeDoKeyword"
1016+
case \DoExprSyntax.doKeyword:
1017+
return "doKeyword"
1018+
case \DoExprSyntax.unexpectedBetweenDoKeywordAndBody:
1019+
return "unexpectedBetweenDoKeywordAndBody"
1020+
case \DoExprSyntax.body:
1021+
return "body"
1022+
case \DoExprSyntax.unexpectedBetweenBodyAndCatchClauses:
1023+
return "unexpectedBetweenBodyAndCatchClauses"
1024+
case \DoExprSyntax.catchClauses:
1025+
return "catchClauses"
1026+
case \DoExprSyntax.unexpectedAfterCatchClauses:
1027+
return "unexpectedAfterCatchClauses"
10141028
case \DoStmtSyntax.unexpectedBeforeDoKeyword:
10151029
return "unexpectedBeforeDoKeyword"
10161030
case \DoStmtSyntax.doKeyword:

Sources/SwiftSyntax/generated/SyntaxAnyVisitor.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,14 @@ open class SyntaxAnyVisitor: SyntaxVisitor {
728728
visitAnyPost(node._syntaxNode)
729729
}
730730

731+
override open func visit(_ node: DoExprSyntax) -> SyntaxVisitorContinueKind {
732+
return visitAny(node._syntaxNode)
733+
}
734+
735+
override open func visitPost(_ node: DoExprSyntax) {
736+
visitAnyPost(node._syntaxNode)
737+
}
738+
731739
override open func visit(_ node: DoStmtSyntax) -> SyntaxVisitorContinueKind {
732740
return visitAny(node._syntaxNode)
733741
}

Sources/SwiftSyntax/generated/SyntaxBaseNodes.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ public struct ExprSyntax: ExprSyntaxProtocol, SyntaxHashable {
466466

467467
public init?(_ node: some SyntaxProtocol) {
468468
switch node.raw.kind {
469-
case .arrayExpr, .arrowExpr, .asExpr, .assignmentExpr, .awaitExpr, .binaryOperatorExpr, .booleanLiteralExpr, .borrowExpr, .canImportExpr, .canImportVersionInfo, .closureExpr, .consumeExpr, .copyExpr, .declReferenceExpr, .dictionaryExpr, .discardAssignmentExpr, .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:
469+
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:
470470
self._syntaxNode = node._syntaxNode
471471
default:
472472
return nil
@@ -507,6 +507,7 @@ public struct ExprSyntax: ExprSyntaxProtocol, SyntaxHashable {
507507
.node(DeclReferenceExprSyntax.self),
508508
.node(DictionaryExprSyntax.self),
509509
.node(DiscardAssignmentExprSyntax.self),
510+
.node(DoExprSyntax.self),
510511
.node(EditorPlaceholderExprSyntax.self),
511512
.node(FloatLiteralExprSyntax.self),
512513
.node(ForceUnwrapExprSyntax.self),
@@ -1480,6 +1481,7 @@ extension Syntax {
14801481
.node(DifferentiableAttributeArgumentsSyntax.self),
14811482
.node(DiscardAssignmentExprSyntax.self),
14821483
.node(DiscardStmtSyntax.self),
1484+
.node(DoExprSyntax.self),
14831485
.node(DoStmtSyntax.self),
14841486
.node(DocumentationAttributeArgumentListSyntax.self),
14851487
.node(DocumentationAttributeArgumentSyntax.self),

Sources/SwiftSyntax/generated/SyntaxCollections.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ public struct AvailabilityArgumentListSyntax: SyntaxCollection, SyntaxHashable {
229229
///
230230
/// ### Contained in
231231
///
232+
/// - ``DoExprSyntax``.``DoExprSyntax/catchClauses``
232233
/// - ``DoStmtSyntax``.``DoStmtSyntax/catchClauses``
233234
public struct CatchClauseListSyntax: SyntaxCollection, SyntaxHashable {
234235
public typealias Element = CatchClauseSyntax

Sources/SwiftSyntax/generated/SyntaxEnum.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ public enum SyntaxEnum {
9999
case differentiableAttributeArguments(DifferentiableAttributeArgumentsSyntax)
100100
case discardAssignmentExpr(DiscardAssignmentExprSyntax)
101101
case discardStmt(DiscardStmtSyntax)
102+
case doExpr(DoExprSyntax)
102103
case doStmt(DoStmtSyntax)
103104
case documentationAttributeArgumentList(DocumentationAttributeArgumentListSyntax)
104105
case documentationAttributeArgument(DocumentationAttributeArgumentSyntax)
@@ -467,6 +468,8 @@ public extension Syntax {
467468
return .discardAssignmentExpr(DiscardAssignmentExprSyntax(self)!)
468469
case .discardStmt:
469470
return .discardStmt(DiscardStmtSyntax(self)!)
471+
case .doExpr:
472+
return .doExpr(DoExprSyntax(self)!)
470473
case .doStmt:
471474
return .doStmt(DoStmtSyntax(self)!)
472475
case .documentationAttributeArgumentList:

Sources/SwiftSyntax/generated/SyntaxKind.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ public enum SyntaxKind: CaseIterable {
9999
case differentiableAttributeArguments
100100
case discardAssignmentExpr
101101
case discardStmt
102+
case doExpr
102103
case doStmt
103104
case documentationAttributeArgumentList
104105
case documentationAttributeArgument
@@ -588,6 +589,8 @@ public enum SyntaxKind: CaseIterable {
588589
return DiscardAssignmentExprSyntax.self
589590
case .discardStmt:
590591
return DiscardStmtSyntax.self
592+
case .doExpr:
593+
return DoExprSyntax.self
591594
case .doStmt:
592595
return DoStmtSyntax.self
593596
case .documentationAttributeArgumentList:

0 commit comments

Comments
 (0)