diff options
author | Antonio Cunei <antonio.cunei@epfl.ch> | 2010-09-02 12:14:39 +0000 |
---|---|---|
committer | Antonio Cunei <antonio.cunei@epfl.ch> | 2010-09-02 12:14:39 +0000 |
commit | 8fc350954d7db40dc5bc4899f7925a46e4cb86e6 (patch) | |
tree | b6f31cf2c1b08f30ec34e43439018d5a6c711eee | |
parent | 583aacd3fcc35449f1997e4399970ad23bbe6d9c (diff) | |
download | scala-8fc350954d7db40dc5bc4899f7925a46e4cb86e6.tar.gz scala-8fc350954d7db40dc5bc4899f7925a46e4cb86e6.tar.bz2 scala-8fc350954d7db40dc5bc4899f7925a46e4cb86e6.zip |
Merged revisions 22870 via svnmerge from
https://lampsvn.epfl.ch/svn-repos/scala/scala/trunk
........
r22870 | milessabin | 2010-08-31 12:56:53 +0200 (Tue, 31 Aug 2010) | 1 line
Fix for #3765. Thanks to Mirko Stocker for the patch. Review by
odersky. ........
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/Scanners.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala b/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala index 5e9cc3f46e..445d869681 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala @@ -173,6 +173,9 @@ trait Scanners { // Read a token or copy it from `next` tokenData if (next.token == EMPTY) { lastOffset = charOffset - 1 + if(lastOffset > 0 && buf(lastOffset) == '\n' && buf(lastOffset - 1) == '\r') { + lastOffset -= 1 + } fetchToken() } else { this copyFrom next |