summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-01-25 04:43:34 -0800
committerJason Zaugg <jzaugg@gmail.com>2014-01-25 04:43:34 -0800
commit84a4f64cc68e776ea92d601afcf0cf5a3f8d1e69 (patch)
treeafe78a01bdb3edfb56289db8b8bd328ed45df1e3 /src
parent6eb55d47a28d06e2cbc3430dcbdbc7649a514d1c (diff)
parent48413b4afb6436eedb0d4a4fe4089cb45d7fb493 (diff)
downloadscala-84a4f64cc68e776ea92d601afcf0cf5a3f8d1e69.tar.gz
scala-84a4f64cc68e776ea92d601afcf0cf5a3f8d1e69.tar.bz2
scala-84a4f64cc68e776ea92d601afcf0cf5a3f8d1e69.zip
Merge pull request #3411 from som-snytt/issue/7919-si-nl
Newline after empty string interp
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/Scanners.scala7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala b/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala
index 8011abc1ed..e8d46704c3 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala
@@ -475,14 +475,17 @@ trait Scanners extends ScannersCommon {
if (token == INTERPOLATIONID) {
nextRawChar()
if (ch == '\"') {
- nextRawChar()
- if (ch == '\"') {
+ val lookahead = lookaheadReader
+ lookahead.nextChar()
+ if (lookahead.ch == '\"') {
+ nextRawChar() // now eat it
offset += 3
nextRawChar()
getStringPart(multiLine = true)
sepRegions = STRINGPART :: sepRegions // indicate string part
sepRegions = STRINGLIT :: sepRegions // once more to indicate multi line string part
} else {
+ nextChar()
token = STRINGLIT
strVal = ""
}