diff options
-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 |