Skip to content

Commit 8d68708

Browse files
committed
Re-generate code-generated files
Cherry-picking caused a few codegen’d files to be out-of-date. Re-generate them now.
1 parent a577f19 commit 8d68708

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

Sources/SwiftSyntax/generated/ChildNameForKeyPath.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1712,12 +1712,8 @@ internal func childName(_ keyPath: AnyKeyPath) -> String? {
17121712
return "rightOperand"
17131713
case \InfixOperatorExprSyntax.unexpectedAfterRightOperand:
17141714
return "unexpectedAfterRightOperand"
1715-
case \InheritedTypeSyntax.unexpectedBeforeHasWithout:
1716-
return "unexpectedBeforeHasWithout"
1717-
case \InheritedTypeSyntax.hasWithout:
1718-
return "hasWithout"
1719-
case \InheritedTypeSyntax.unexpectedBetweenHasWithoutAndTypeName:
1720-
return "unexpectedBetweenHasWithoutAndTypeName"
1715+
case \InheritedTypeSyntax.unexpectedBeforeTypeName:
1716+
return "unexpectedBeforeTypeName"
17211717
case \InheritedTypeSyntax.typeName:
17221718
return "typeName"
17231719
case \InheritedTypeSyntax.unexpectedBetweenTypeNameAndTrailingComma:

Sources/SwiftSyntax/generated/raw/RawSyntaxValidation.swift

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
/// Note that this only validates the immediate children.
1818
/// Results in an assertion failure if the layout is invalid.
1919
func validateLayout(layout: RawSyntaxBuffer, as kind: SyntaxKind) {
20-
#if DEBUG
20+
#if SWIFTSYNTAX_ENABLE_RAWSYNTAX_VALIDATION
2121
enum TokenChoice: CustomStringConvertible {
2222
case keyword(StaticString)
2323
case tokenKind(RawTokenKind)
@@ -140,7 +140,6 @@ func validateLayout(layout: RawSyntaxBuffer, as kind: SyntaxKind) {
140140
// the list of expected token choices in the syntax tree doesn't match those
141141
// the parser generates. Disable the verification for now until all issues
142142
// regarding it are fixed.
143-
#if VALIDATE_TOKEN_CHOICES
144143
if raw != nil {
145144
return verify(
146145
raw,
@@ -151,9 +150,6 @@ func validateLayout(layout: RawSyntaxBuffer, as kind: SyntaxKind) {
151150
)
152151
}
153152
return nil
154-
#else
155-
return verify(raw, as: RawTokenSyntax?.self)
156-
#endif
157153
}
158154
func verify(
159155
_ raw: RawSyntax?,
@@ -166,7 +162,6 @@ func validateLayout(layout: RawSyntaxBuffer, as kind: SyntaxKind) {
166162
// the list of expected token choices in the syntax tree doesn't match those
167163
// the parser generates. Disable the verification for now until all issues
168164
// regarding it are fixed.
169-
#if VALIDATE_TOKEN_CHOICES
170165
guard let raw = raw else {
171166
return .expectedNonNil(expectedKind: RawTokenSyntax.self, file: file, line: line)
172167
}
@@ -193,9 +188,6 @@ func validateLayout(layout: RawSyntaxBuffer, as kind: SyntaxKind) {
193188
file: file,
194189
line: line
195190
)
196-
#else
197-
return verify(raw, as: RawTokenSyntax.self)
198-
#endif
199191
}
200192
func assertNoError(_ nodeKind: SyntaxKind, _ index: Int, _ error: ValidationError?) {
201193
if let error = error {

0 commit comments

Comments
 (0)