Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Parse error on case expressions #60

nullptr opened this Issue · 1 comment

2 participants


This took a while to narrow down, but the parser breaks on certain case expressions that are accepted by the scala compiler. For instance, it doesn't seem to like case expressions that only contain value assignments. The following (non-sensical) script demonstrates the issue; it will execute using$ scala Main.scala, but is rejected by scalariform.

final object Main
        def main(args: Array[String]): Unit = {
                if (args.length < 1)
                args(0) match {
                        case "blah" =>
                                val x = args(0)
                        case _ =>
                                println("not blah")
@mdr mdr closed this in bd66f23

This is fixed now in master (the lexer wasn't emitting a NEWLINE token after the val statement).

@gbasler gbasler referenced this issue in sbt/sbt-scalariform

Improve error reporting #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.