PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: scalameta/scalameta (scala)

Issue:
Scala 3: `transparent class` fails to parse
## Configuration ##

```
version = 3.8.3
runner.dialect = scala3
```

## Command-line parameters (required) ##

When I run scalafmt via CLI like this: `scalafmt a.scala`

## Steps

Given code like this:
```scala
transparent class Foo
```

## Problem

Scalafmt fails to parse the code:
```scala
/tmp/test/a.scala:1: error: [dialect scala3] `;` expected but `class` found
transparent class Foo
            ^
```

## Expectation

Scalafmt does not fail to parse the code

## Workaround

disabling formatting for the line

## Notes

> Scala 3 allows one to mark a trait or class as `transparent`

https://docs.scala-lang.org/scala3/reference/other-new-features/transparent-traits.html

Pull request:
Fixes https://github.com/scalameta/scalameta/issues/3947

I don't think we need to add a dialect for it, since the error isn't really important for parser

Patch:
diff --git a/scalameta/parsers/shared/src/main/scala/scala/meta/internal/parsers/ScannerTokens.scala b/scalameta/parsers/shared/src/main/scala/scala/meta/internal/parsers/ScannerTokens.scala
index 7a88652fc2..1d0b958ffe 100644
--- a/scalameta/parsers/shared/src/main/scala/scala/meta/internal/parsers/ScannerTokens.scala
+++ b/scalameta/parsers/shared/src/main/scala/scala/meta/internal/parsers/ScannerTokens.scala
@@ -123,7 +123,7 @@ final class ScannerTokens(val tokens: Tokens)(implicit dialect: Dialect) {
     }
 
     tokens(index).text match {
-      case soft.KwTransparent() => nextIsDclIntroOrModifierOr(_.is[KwTrait])
+      case soft.KwTransparent() => nextIsDclIntroOrModifierOr(_.isAny[KwTrait, KwClass])
       case soft.KwOpaque() => nextIsDclIntroOrModifierOr(_ => false)
       case soft.KwInline() => nextIsDclIntroOrModifierOr(matchesAfterInlineMatchMod)
       case soft.KwOpen() | soft.KwInfix() | soft.KwErased() => isDefIntro(getNextIndex(index))


Test patch:
diff --git a/tests/shared/src/test/scala/scala/meta/tests/parsers/dotty/InlineSuite.scala b/tests/shared/src/test/scala/scala/meta/tests/parsers/dotty/InlineSuite.scala
index da46c0a681..fa3b4effad 100644
--- a/tests/shared/src/test/scala/scala/meta/tests/parsers/dotty/InlineSuite.scala
+++ b/tests/shared/src/test/scala/scala/meta/tests/parsers/dotty/InlineSuite.scala
@@ -340,6 +340,12 @@ class InlineSuite extends BaseDottySuite {
     )
   }
 
+  test("transparent-class") {
+    runTestAssert[Stat]("transparent class S")(
+      Defn.Class(List(Mod.Transparent()), pname("S"), Nil, ctor, tplNoBody())
+    )
+  }
+
   test("transparent-trait-newlines") {
     runTestAssert[Stat](
       """|transparent