diff options
author | Paul Phillips <paulp@improving.org> | 2009-05-14 16:04:20 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-05-14 16:04:20 +0000 |
commit | 4168caa00c3926e5887ae1a8f747fa2d58bd8166 (patch) | |
tree | 91d9f32de49c39f0f48f5f58aefcb7ed0c1820eb | |
parent | a4b9b4366e1923633465781b73653559188c7396 (diff) | |
download | scala-4168caa00c3926e5887ae1a8f747fa2d58bd8166.tar.gz scala-4168caa00c3926e5887ae1a8f747fa2d58bd8166.tar.bz2 scala-4168caa00c3926e5887ae1a8f747fa2d58bd8166.zip |
some minor cruft removal.
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/NewScanners.scala | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/NewScanners.scala b/src/compiler/scala/tools/nsc/ast/parser/NewScanners.scala index 8696e194ba..d170d0257e 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/NewScanners.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/NewScanners.scala @@ -210,15 +210,11 @@ trait NewScanners { if (!xmlOk) in.error(current.offset, "XML mode not legal here") val headIsRBRACE = if (sepRegions.isEmpty) true else sepRegions.head == RBRACE val hasNewline = fillNext - if (headIsRBRACE && (inLastOfStat(lastCode) && inFirstOfStat(next.code) - /* This need to be commented out, otherwise line - continuation in the interpreter will not work - XXX: not sure how the IDE reacts with this commented out. - || next.code == EOF */ )) { - //if (hasNewline) current.code = NEWLINES - } else { - currentIsNext - } + + /** don't check for next.code == EOF else repl line continuation won't work */ + if (headIsRBRACE && (inLastOfStat(lastCode) && inFirstOfStat(next.code))) { } + else currentIsNext + case _ => } } @@ -463,9 +459,6 @@ trait NewScanners { else { in.scratch append "\"\""; true } - case '\\' if false => // XXX: not for multi-line strings? - in.scratch append escapeCode(in.offset - 1) - true case c => in.scratch append c; true }) {} val ret = value(STRINGLIT, in.scratch.toString) |