Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Parse error on case expressions #60

Closed
nullptr opened this Issue · 1 comment

2 participants

@nullptr

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)
                        System.exit(1)
                args(0) match {
                        case "blah" =>
                                val x = args(0)
                        case _ =>
                                println("not blah")
                }
        }
}
@mdr mdr closed this in bd66f23
@mdr
Owner

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
Closed

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.