Skip to content

Commit

Permalink
dialect
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Apr 8, 2024
1 parent c5811d9 commit 166621e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/src/main/scala-latest-js/scalameta_ast/MainCompat.scala
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,13 @@ trait MainCompat {
import scala.meta._
val convert = implicitly[Convert[String, Input]]
val main = new ScalametaAST
val dialects = List(scala.meta.dialects.Scala3)
val dialects =
main.stringToDialects.getOrElse(
dialect, {
Console.err.println(s"invalid dialct ${dialect}")
main.dialectsDefault
}
)

val input = convert.apply(src)
val tree: Tree = main.loopParse(
Expand Down

0 comments on commit 166621e

Please sign in to comment.