Skip to content

Commit 0cd30c5

Browse files
committed
Rename children of differentiability nodes
Those have been renamed in SwiftSyntax.
1 parent ca6a8ea commit 0cd30c5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/SwiftFormatPrettyPrint/TokenStreamCreator.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2532,9 +2532,9 @@ fileprivate final class TokenStreamCreator: SyntaxVisitor {
25322532
// This node encapsulates the entire list of arguments in a `@differentiable(...)` attribute.
25332533
var needsBreakBeforeWhereClause = false
25342534

2535-
if let diffParamsComma = node.parametersComma {
2535+
if let diffParamsComma = node.argumentsComma {
25362536
after(diffParamsComma, tokens: .break(.same))
2537-
} else if node.parameters != nil {
2537+
} else if node.arguments != nil {
25382538
// If there were diff params but no comma following them, then we have "wrt: foo where ..."
25392539
// and we need a break before the where clause.
25402540
needsBreakBeforeWhereClause = true
@@ -2571,7 +2571,7 @@ fileprivate final class TokenStreamCreator: SyntaxVisitor {
25712571
// The comma after originalDeclName is optional and is only present if there are diffParams.
25722572
after(node.comma ?? node.originalDeclName.lastToken(viewMode: .sourceAccurate), tokens: .close)
25732573

2574-
if let diffParams = node.parameters {
2574+
if let diffParams = node.arguments {
25752575
before(diffParams.firstToken(viewMode: .sourceAccurate), tokens: .break(.same), .open)
25762576
after(diffParams.lastToken(viewMode: .sourceAccurate), tokens: .close)
25772577
}

0 commit comments

Comments
 (0)