Skip to content

Commit b1fda56

Browse files
committed
Regenerate sources
1 parent a1c2327 commit b1fda56

File tree

20 files changed

+3
-665
lines changed

20 files changed

+3
-665
lines changed

CodeGeneration/Sources/SyntaxSupport/gyb_generated/StmtNodes.swift

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -695,39 +695,4 @@ public let STMT_NODES: [Node] = [
695695
kind: "CodeBlock")
696696
]),
697697

698-
Node(name: "PoundAssertStmt",
699-
nameForDiagnostics: "'#assert' directive",
700-
kind: "Stmt",
701-
children: [
702-
Child(name: "PoundAssert",
703-
kind: "PoundAssertToken",
704-
tokenChoices: [
705-
"PoundAssert"
706-
]),
707-
Child(name: "LeftParen",
708-
kind: "LeftParenToken",
709-
tokenChoices: [
710-
"LeftParen"
711-
]),
712-
Child(name: "Condition",
713-
kind: "Expr",
714-
description: "The assertion condition."),
715-
Child(name: "Comma",
716-
kind: "CommaToken",
717-
description: "The comma after the assertion condition.",
718-
isOptional: true,
719-
tokenChoices: [
720-
"Comma"
721-
]),
722-
Child(name: "Message",
723-
kind: "StringLiteralExpr",
724-
description: "The assertion message.",
725-
isOptional: true),
726-
Child(name: "RightParen",
727-
kind: "RightParenToken",
728-
tokenChoices: [
729-
"RightParen"
730-
])
731-
]),
732-
733698
]

CodeGeneration/Sources/SyntaxSupport/gyb_generated/TokenSpec.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ public let SYNTAX_TOKENS: [TokenSpec] = [
205205
PoundKeywordSpec(name: "PoundColumn", kind: "pound_column", text: "#column"),
206206
PoundKeywordSpec(name: "PoundFunction", kind: "pound_function", text: "#function"),
207207
PoundKeywordSpec(name: "PoundDsohandle", kind: "pound_dsohandle", text: "#dsohandle"),
208-
PoundKeywordSpec(name: "PoundAssert", kind: "pound_assert", text: "#assert"),
209208
PoundDirectiveKeywordSpec(name: "PoundSourceLocation", kind: "pound_sourceLocation", text: "#sourceLocation"),
210209
PoundDirectiveKeywordSpec(name: "PoundWarning", kind: "pound_warning", text: "#warning"),
211210
PoundDirectiveKeywordSpec(name: "PoundError", kind: "pound_error", text: "#error"),

Sources/IDEUtils/generated/SyntaxClassification.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,6 @@ extension RawTokenKind {
210210
return .keyword
211211
case .poundDsohandleKeyword:
212212
return .keyword
213-
case .poundAssertKeyword:
214-
return .keyword
215213
case .poundSourceLocationKeyword:
216214
return .poundDirectiveKeyword
217215
case .poundWarningKeyword:

Sources/SwiftBasicFormat/generated/BasicFormat.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,6 @@ open class BasicFormat: SyntaxRewriter {
216216
return true
217217
case .poundDsohandleKeyword:
218218
return true
219-
case .poundAssertKeyword:
220-
return true
221219
case .poundSourceLocationKeyword:
222220
return true
223221
case .poundWarningKeyword:

Sources/SwiftSyntax/Documentation.docc/gyb_generated/SwiftSyntax.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ allows Swift tools to parse, inspect, generate, and transform Swift source code.
100100
- <doc:SwiftSyntax/BreakStmtSyntax>
101101
- <doc:SwiftSyntax/ThrowStmtSyntax>
102102
- <doc:SwiftSyntax/IfStmtSyntax>
103-
- <doc:SwiftSyntax/PoundAssertStmtSyntax>
104103

105104
### Expressions
106105

Sources/SwiftSyntax/Raw/gyb_generated/RawSyntaxNodes.swift

Lines changed: 1 addition & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public struct RawStmtSyntax: RawStmtSyntaxNodeProtocol {
9696

9797
public static func isKindOf(_ raw: RawSyntax) -> Bool {
9898
switch raw.kind {
99-
case .missingStmt, .labeledStmt, .continueStmt, .whileStmt, .deferStmt, .repeatWhileStmt, .guardStmt, .forInStmt, .switchStmt, .doStmt, .returnStmt, .yieldStmt, .fallthroughStmt, .breakStmt, .throwStmt, .ifStmt, .poundAssertStmt: return true
99+
case .missingStmt, .labeledStmt, .continueStmt, .whileStmt, .deferStmt, .repeatWhileStmt, .guardStmt, .forInStmt, .switchStmt, .doStmt, .returnStmt, .yieldStmt, .fallthroughStmt, .breakStmt, .throwStmt, .ifStmt: return true
100100
default: return false
101101
}
102102
}
@@ -15243,106 +15243,6 @@ public struct RawCatchClauseSyntax: RawSyntaxNodeProtocol {
1524315243
}
1524415244
}
1524515245

15246-
@_spi(RawSyntax)
15247-
public struct RawPoundAssertStmtSyntax: RawStmtSyntaxNodeProtocol {
15248-
15249-
@_spi(RawSyntax)
15250-
public var layoutView: RawSyntaxLayoutView {
15251-
return raw.layoutView!
15252-
}
15253-
15254-
public static func isKindOf(_ raw: RawSyntax) -> Bool {
15255-
return raw.kind == .poundAssertStmt
15256-
}
15257-
15258-
public var raw: RawSyntax
15259-
init(raw: RawSyntax) {
15260-
assert(Self.isKindOf(raw))
15261-
self.raw = raw
15262-
}
15263-
15264-
public init?<Node: RawSyntaxNodeProtocol>(_ other: Node) {
15265-
guard Self.isKindOf(other.raw) else { return nil }
15266-
self.init(raw: other.raw)
15267-
}
15268-
15269-
public init(
15270-
_ unexpectedBeforePoundAssert: RawUnexpectedNodesSyntax? = nil,
15271-
poundAssert: RawTokenSyntax,
15272-
_ unexpectedBetweenPoundAssertAndLeftParen: RawUnexpectedNodesSyntax? = nil,
15273-
leftParen: RawTokenSyntax,
15274-
_ unexpectedBetweenLeftParenAndCondition: RawUnexpectedNodesSyntax? = nil,
15275-
condition: RawExprSyntax,
15276-
_ unexpectedBetweenConditionAndComma: RawUnexpectedNodesSyntax? = nil,
15277-
comma: RawTokenSyntax?,
15278-
_ unexpectedBetweenCommaAndMessage: RawUnexpectedNodesSyntax? = nil,
15279-
message: RawStringLiteralExprSyntax?,
15280-
_ unexpectedBetweenMessageAndRightParen: RawUnexpectedNodesSyntax? = nil,
15281-
rightParen: RawTokenSyntax,
15282-
_ unexpectedAfterRightParen: RawUnexpectedNodesSyntax? = nil,
15283-
arena: __shared SyntaxArena
15284-
) {
15285-
let raw = RawSyntax.makeLayout(
15286-
kind: .poundAssertStmt, uninitializedCount: 13, arena: arena) { layout in
15287-
layout.initialize(repeating: nil)
15288-
layout[0] = unexpectedBeforePoundAssert?.raw
15289-
layout[1] = poundAssert.raw
15290-
layout[2] = unexpectedBetweenPoundAssertAndLeftParen?.raw
15291-
layout[3] = leftParen.raw
15292-
layout[4] = unexpectedBetweenLeftParenAndCondition?.raw
15293-
layout[5] = condition.raw
15294-
layout[6] = unexpectedBetweenConditionAndComma?.raw
15295-
layout[7] = comma?.raw
15296-
layout[8] = unexpectedBetweenCommaAndMessage?.raw
15297-
layout[9] = message?.raw
15298-
layout[10] = unexpectedBetweenMessageAndRightParen?.raw
15299-
layout[11] = rightParen.raw
15300-
layout[12] = unexpectedAfterRightParen?.raw
15301-
}
15302-
self.init(raw: raw)
15303-
}
15304-
15305-
public var unexpectedBeforePoundAssert: RawUnexpectedNodesSyntax? {
15306-
layoutView.children[0].map(RawUnexpectedNodesSyntax.init(raw:))
15307-
}
15308-
public var poundAssert: RawTokenSyntax {
15309-
layoutView.children[1].map(RawTokenSyntax.init(raw:))!
15310-
}
15311-
public var unexpectedBetweenPoundAssertAndLeftParen: RawUnexpectedNodesSyntax? {
15312-
layoutView.children[2].map(RawUnexpectedNodesSyntax.init(raw:))
15313-
}
15314-
public var leftParen: RawTokenSyntax {
15315-
layoutView.children[3].map(RawTokenSyntax.init(raw:))!
15316-
}
15317-
public var unexpectedBetweenLeftParenAndCondition: RawUnexpectedNodesSyntax? {
15318-
layoutView.children[4].map(RawUnexpectedNodesSyntax.init(raw:))
15319-
}
15320-
public var condition: RawExprSyntax {
15321-
layoutView.children[5].map(RawExprSyntax.init(raw:))!
15322-
}
15323-
public var unexpectedBetweenConditionAndComma: RawUnexpectedNodesSyntax? {
15324-
layoutView.children[6].map(RawUnexpectedNodesSyntax.init(raw:))
15325-
}
15326-
public var comma: RawTokenSyntax? {
15327-
layoutView.children[7].map(RawTokenSyntax.init(raw:))
15328-
}
15329-
public var unexpectedBetweenCommaAndMessage: RawUnexpectedNodesSyntax? {
15330-
layoutView.children[8].map(RawUnexpectedNodesSyntax.init(raw:))
15331-
}
15332-
public var message: RawStringLiteralExprSyntax? {
15333-
layoutView.children[9].map(RawStringLiteralExprSyntax.init(raw:))
15334-
}
15335-
public var unexpectedBetweenMessageAndRightParen: RawUnexpectedNodesSyntax? {
15336-
layoutView.children[10].map(RawUnexpectedNodesSyntax.init(raw:))
15337-
}
15338-
public var rightParen: RawTokenSyntax {
15339-
layoutView.children[11].map(RawTokenSyntax.init(raw:))!
15340-
}
15341-
public var unexpectedAfterRightParen: RawUnexpectedNodesSyntax? {
15342-
layoutView.children[12].map(RawUnexpectedNodesSyntax.init(raw:))
15343-
}
15344-
}
15345-
1534615246
@_spi(RawSyntax)
1534715247
public struct RawGenericWhereClauseSyntax: RawSyntaxNodeProtocol {
1534815248

Sources/SwiftSyntax/Raw/gyb_generated/RawSyntaxValidation.swift

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2226,22 +2226,6 @@ func validateLayout(layout: RawSyntaxBuffer, as kind: SyntaxKind) {
22262226
assertNoError(kind, 5, verify(layout[5], as: RawCodeBlockSyntax.self))
22272227
assertNoError(kind, 6, verify(layout[6], as: RawUnexpectedNodesSyntax?.self))
22282228
break
2229-
case .poundAssertStmt:
2230-
assert(layout.count == 13)
2231-
assertNoError(kind, 0, verify(layout[0], as: RawUnexpectedNodesSyntax?.self))
2232-
assertNoError(kind, 1, verify(layout[1], as: RawTokenSyntax.self))
2233-
assertNoError(kind, 2, verify(layout[2], as: RawUnexpectedNodesSyntax?.self))
2234-
assertNoError(kind, 3, verify(layout[3], as: RawTokenSyntax.self))
2235-
assertNoError(kind, 4, verify(layout[4], as: RawUnexpectedNodesSyntax?.self))
2236-
assertNoError(kind, 5, verify(layout[5], as: RawExprSyntax.self))
2237-
assertNoError(kind, 6, verify(layout[6], as: RawUnexpectedNodesSyntax?.self))
2238-
assertNoError(kind, 7, verify(layout[7], as: RawTokenSyntax?.self))
2239-
assertNoError(kind, 8, verify(layout[8], as: RawUnexpectedNodesSyntax?.self))
2240-
assertNoError(kind, 9, verify(layout[9], as: RawStringLiteralExprSyntax?.self))
2241-
assertNoError(kind, 10, verify(layout[10], as: RawUnexpectedNodesSyntax?.self))
2242-
assertNoError(kind, 11, verify(layout[11], as: RawTokenSyntax.self))
2243-
assertNoError(kind, 12, verify(layout[12], as: RawUnexpectedNodesSyntax?.self))
2244-
break
22452229
case .genericWhereClause:
22462230
assert(layout.count == 5)
22472231
assertNoError(kind, 0, verify(layout[0], as: RawUnexpectedNodesSyntax?.self))

Sources/SwiftSyntax/generated/Misc.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ extension Syntax {
206206
.node(PatternBindingSyntax.self),
207207
.node(PostfixIfConfigExprSyntax.self),
208208
.node(PostfixUnaryExprSyntax.self),
209-
.node(PoundAssertStmtSyntax.self),
210209
.node(PoundErrorDeclSyntax.self),
211210
.node(PoundSourceLocationArgsSyntax.self),
212211
.node(PoundSourceLocationSyntax.self),
@@ -664,8 +663,6 @@ extension SyntaxKind {
664663
return PostfixIfConfigExprSyntax.self
665664
case .postfixUnaryExpr:
666665
return PostfixUnaryExprSyntax.self
667-
case .poundAssertStmt:
668-
return PoundAssertStmtSyntax.self
669666
case .poundErrorDecl:
670667
return PoundErrorDeclSyntax.self
671668
case .poundSourceLocationArgs:
@@ -1197,8 +1194,6 @@ extension SyntaxKind {
11971194
return nil
11981195
case .postfixUnaryExpr:
11991196
return "postfix expression"
1200-
case .poundAssertStmt:
1201-
return "'#assert' directive"
12021197
case .poundErrorDecl:
12031198
return "'#error' directive"
12041199
case .poundSourceLocationArgs:

Sources/SwiftSyntax/generated/SyntaxAnyVisitor.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1553,14 +1553,6 @@ open class SyntaxAnyVisitor: SyntaxVisitor {
15531553
visitAnyPost(node._syntaxNode)
15541554
}
15551555

1556-
override open func visit(_ node: PoundAssertStmtSyntax) -> SyntaxVisitorContinueKind {
1557-
return visitAny(node._syntaxNode)
1558-
}
1559-
1560-
override open func visitPost(_ node: PoundAssertStmtSyntax) {
1561-
visitAnyPost(node._syntaxNode)
1562-
}
1563-
15641556
override open func visit(_ node: PoundErrorDeclSyntax) -> SyntaxVisitorContinueKind {
15651557
return visitAny(node._syntaxNode)
15661558
}

Sources/SwiftSyntax/generated/SyntaxBaseNodes.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ public struct StmtSyntax: StmtSyntaxProtocol, SyntaxHashable {
525525

526526
public init?<S: SyntaxProtocol>(_ node: S) {
527527
switch node.raw.kind {
528-
case .breakStmt, .continueStmt, .deferStmt, .doStmt, .fallthroughStmt, .forInStmt, .guardStmt, .ifStmt, .labeledStmt, .missingStmt, .poundAssertStmt, .repeatWhileStmt, .returnStmt, .switchStmt, .throwStmt, .whileStmt, .yieldStmt:
528+
case .breakStmt, .continueStmt, .deferStmt, .doStmt, .fallthroughStmt, .forInStmt, .guardStmt, .ifStmt, .labeledStmt, .missingStmt, .repeatWhileStmt, .returnStmt, .switchStmt, .throwStmt, .whileStmt, .yieldStmt:
529529
self._syntaxNode = node._syntaxNode
530530
default:
531531
return nil
@@ -538,7 +538,7 @@ public struct StmtSyntax: StmtSyntaxProtocol, SyntaxHashable {
538538
internal init(_ data: SyntaxData) {
539539
#if DEBUG
540540
switch data.raw.kind {
541-
case .breakStmt, .continueStmt, .deferStmt, .doStmt, .fallthroughStmt, .forInStmt, .guardStmt, .ifStmt, .labeledStmt, .missingStmt, .poundAssertStmt, .repeatWhileStmt, .returnStmt, .switchStmt, .throwStmt, .whileStmt, .yieldStmt:
541+
case .breakStmt, .continueStmt, .deferStmt, .doStmt, .fallthroughStmt, .forInStmt, .guardStmt, .ifStmt, .labeledStmt, .missingStmt, .repeatWhileStmt, .returnStmt, .switchStmt, .throwStmt, .whileStmt, .yieldStmt:
542542
break
543543
default:
544544
fatalError("Unable to create StmtSyntax from \(data.raw.kind)")
@@ -584,7 +584,6 @@ public struct StmtSyntax: StmtSyntaxProtocol, SyntaxHashable {
584584
.node(IfStmtSyntax.self),
585585
.node(LabeledStmtSyntax.self),
586586
.node(MissingStmtSyntax.self),
587-
.node(PoundAssertStmtSyntax.self),
588587
.node(RepeatWhileStmtSyntax.self),
589588
.node(ReturnStmtSyntax.self),
590589
.node(SwitchStmtSyntax.self),

Sources/SwiftSyntax/generated/SyntaxEnum.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,6 @@ public enum SyntaxEnum {
393393

394394
case postfixUnaryExpr(PostfixUnaryExprSyntax)
395395

396-
case poundAssertStmt(PoundAssertStmtSyntax)
397-
398396
case poundErrorDecl(PoundErrorDeclSyntax)
399397

400398
case poundSourceLocationArgs(PoundSourceLocationArgsSyntax)
@@ -926,8 +924,6 @@ public extension Syntax {
926924
return .postfixIfConfigExpr(PostfixIfConfigExprSyntax(self)!)
927925
case .postfixUnaryExpr:
928926
return .postfixUnaryExpr(PostfixUnaryExprSyntax(self)!)
929-
case .poundAssertStmt:
930-
return .poundAssertStmt(PoundAssertStmtSyntax(self)!)
931927
case .poundErrorDecl:
932928
return .poundErrorDecl(PoundErrorDeclSyntax(self)!)
933929
case .poundSourceLocationArgs:

Sources/SwiftSyntax/generated/SyntaxKind.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,6 @@ public enum SyntaxKind {
393393

394394
case postfixUnaryExpr
395395

396-
case poundAssertStmt
397-
398396
case poundErrorDecl
399397

400398
case poundSourceLocationArgs

Sources/SwiftSyntax/generated/SyntaxRewriter.swift

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,13 +1336,6 @@ open class SyntaxRewriter {
13361336
return ExprSyntax(visitChildren(node))
13371337
}
13381338

1339-
/// Visit a `PoundAssertStmtSyntax`.
1340-
/// - Parameter node: the node that is being visited
1341-
/// - Returns: the rewritten node
1342-
open func visit(_ node: PoundAssertStmtSyntax) -> StmtSyntax {
1343-
return StmtSyntax(visitChildren(node))
1344-
}
1345-
13461339
/// Visit a `PoundErrorDeclSyntax`.
13471340
/// - Parameter node: the node that is being visited
13481341
/// - Returns: the rewritten node
@@ -4560,20 +4553,6 @@ open class SyntaxRewriter {
45604553
return Syntax(visit(node))
45614554
}
45624555

4563-
/// Implementation detail of visit(_:). Do not call directly.
4564-
private func visitImplPoundAssertStmtSyntax(_ data: SyntaxData) -> Syntax {
4565-
let node = PoundAssertStmtSyntax(data)
4566-
// Accessing _syntaxNode directly is faster than calling Syntax(node)
4567-
visitPre(node._syntaxNode)
4568-
defer {
4569-
visitPost(node._syntaxNode)
4570-
}
4571-
if let newNode = visitAny(node._syntaxNode) {
4572-
return newNode
4573-
}
4574-
return Syntax(visit(node))
4575-
}
4576-
45774556
/// Implementation detail of visit(_:). Do not call directly.
45784557
private func visitImplPoundErrorDeclSyntax(_ data: SyntaxData) -> Syntax {
45794558
let node = PoundErrorDeclSyntax(data)
@@ -6040,8 +6019,6 @@ open class SyntaxRewriter {
60406019
return visitImplPostfixIfConfigExprSyntax
60416020
case .postfixUnaryExpr:
60426021
return visitImplPostfixUnaryExprSyntax
6043-
case .poundAssertStmt:
6044-
return visitImplPoundAssertStmtSyntax
60456022
case .poundErrorDecl:
60466023
return visitImplPoundErrorDeclSyntax
60476024
case .poundSourceLocationArgs:
@@ -6576,8 +6553,6 @@ open class SyntaxRewriter {
65766553
return visitImplPostfixIfConfigExprSyntax(data)
65776554
case .postfixUnaryExpr:
65786555
return visitImplPostfixUnaryExprSyntax(data)
6579-
case .poundAssertStmt:
6580-
return visitImplPoundAssertStmtSyntax(data)
65816556
case .poundErrorDecl:
65826557
return visitImplPoundErrorDeclSyntax(data)
65836558
case .poundSourceLocationArgs:

Sources/SwiftSyntax/generated/SyntaxTransform.swift

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -956,11 +956,6 @@ public protocol SyntaxTransformVisitor {
956956
/// - Returns: the sum of whatever the child visitors return.
957957
func visit(_ node: PostfixUnaryExprSyntax) -> ResultType
958958

959-
/// Visiting `PoundAssertStmtSyntax` specifically.
960-
/// - Parameter node: the node we are visiting.
961-
/// - Returns: the sum of whatever the child visitors return.
962-
func visit(_ node: PoundAssertStmtSyntax) -> ResultType
963-
964959
/// Visiting `PoundErrorDeclSyntax` specifically.
965960
/// - Parameter node: the node we are visiting.
966961
/// - Returns: the sum of whatever the child visitors return.
@@ -2651,13 +2646,6 @@ extension SyntaxTransformVisitor {
26512646
visitAny(Syntax(node))
26522647
}
26532648

2654-
/// Visiting `PoundAssertStmtSyntax` specifically.
2655-
/// - Parameter node: the node we are visiting.
2656-
/// - Returns: nil by default.
2657-
public func visit(_ node: PoundAssertStmtSyntax) -> ResultType {
2658-
visitAny(Syntax(node))
2659-
}
2660-
26612649
/// Visiting `PoundErrorDeclSyntax` specifically.
26622650
/// - Parameter node: the node we are visiting.
26632651
/// - Returns: nil by default.
@@ -3561,8 +3549,6 @@ extension SyntaxTransformVisitor {
35613549
return visit(derived)
35623550
case .postfixUnaryExpr(let derived):
35633551
return visit(derived)
3564-
case .poundAssertStmt(let derived):
3565-
return visit(derived)
35663552
case .poundErrorDecl(let derived):
35673553
return visit(derived)
35683554
case .poundSourceLocationArgs(let derived):

0 commit comments

Comments
 (0)