diff options
author | Paul Phillips <paulp@improving.org> | 2010-01-28 22:55:42 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-01-28 22:55:42 +0000 |
commit | f5dc89196d6a0ed9738ab1c97f76d15223a678a3 (patch) | |
tree | 4dd959e7245046147ced0642b6106cbf4a2bd19a /src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | |
parent | 690542dbe4743e5c4fcc9ca4497351cde339391d (diff) | |
download | scala-f5dc89196d6a0ed9738ab1c97f76d15223a678a3.tar.gz scala-f5dc89196d6a0ed9738ab1c97f76d15223a678a3.tar.bz2 scala-f5dc89196d6a0ed9738ab1c97f76d15223a678a3.zip |
Added a command line option for desugaring matc...
Added a command line option for desugaring match blocks differently for
debugging purposes. No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/parser/Parsers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala index 70d8c5d23f..35048c7a7d 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala @@ -1104,7 +1104,11 @@ self => } } else if (in.token == MATCH) { t = atPos(t.pos.startOrPoint, in.skipToken()) { - Match(stripParens(t), surround(LBRACE, RBRACE)(caseClauses(), Nil)) + /** For debugging pattern matcher transition issues */ + if (settings.Ypmatnaive.value) + makeSequencedMatch(stripParens(t), surround(LBRACE, RBRACE)(caseClauses(), Nil)) + else + Match(stripParens(t), surround(LBRACE, RBRACE)(caseClauses(), Nil)) } } // in order to allow anonymous functions as statements (as opposed to expressions) inside |