Repository: apple/swift-syntax (swift)

Issue:
Parsing fails if line break between enum case element name and parameter clause
### Issue Kind

Parse of Valid Source Failed

### Source Code

This errors out without good reason (with both the new and legacy parsers):
```swift
enum E {
  case a
    (Int)
}
```

Similarly formatted function/subscript parameter lists parse fine.

### Description

_No response_

Pull request description:
Resolves #1709

Patch:
diff --git a/Sources/SwiftParser/Declarations.swift b/Sources/SwiftParser/Declarations.swift
index fcfba32398b..a29b934e32d 100644
--- a/Sources/SwiftParser/Declarations.swift
+++ b/Sources/SwiftParser/Declarations.swift
@@ -918,7 +918,7 @@ extension Parser {
         let (unexpectedBeforeName, name) = self.expectIdentifier(keywordRecovery: true)
 
         let associatedValue: RawEnumCaseParameterClauseSyntax?
-        if self.at(TokenSpec(.leftParen, allowAtStartOfLine: false)) {
+        if self.at(TokenSpec(.leftParen)) {
           associatedValue = self.parseParameterClause(RawEnumCaseParameterClauseSyntax.self) { parser in
             parser.parseEnumCaseParameter()
           }


Test patch:
diff --git a/Tests/SwiftParserTest/DeclarationTests.swift b/Tests/SwiftParserTest/DeclarationTests.swift
index e4a93b5a5a0..d76a27d12d9 100644
--- a/Tests/SwiftParserTest/DeclarationTests.swift
+++ b/Tests/SwiftParserTest/DeclarationTests.swift
@@ -26,6 +26,7 @@ final class DeclarationTests: XCTestCase {
 
     assertParse(#"@_private(sourceFile: "YetAnotherFile.swift") import Foundation"#)
   }
+
   func testStructParsing() {
     assertParse("struct Foo {}")
   }
diff --git a/Tests/SwiftParserTest/translated/EnumTests.swift b/Tests/SwiftParserTest/translated/EnumTests.swift
index 159624e0d2f..34afc9db9e7 100644
--- a/Tests/SwiftParserTest/translated/EnumTests.swift
+++ b/Tests/SwiftParserTest/translated/EnumTests.swift
@@ -1450,4 +1450,15 @@ final class EnumTests: XCTestCase {
       """#
     )
   }
+
+  func parseEnumCaseElementParameterOnNewline() {
+    assertParse(
+      """
+      enum E {
+        case a
+          (Int)
+      }
+      """
+    )
+  }
 }