File tree 1 file changed +8
-4
lines changed
compiler/src/dotty/tools/dotc/parsing 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1245,12 +1245,16 @@ object Parsers {
1245
1245
}
1246
1246
})
1247
1247
1248
- if (in.token == STRINGPART )
1249
- nextSegment(in.offset + (if (isTripleQuoted) 3 else 1 ))
1248
+ var offsetCorrection = if isTripleQuoted then 3 else 1
1249
+ def offset = {
1250
+ val result = in.offset + offsetCorrection
1251
+ offsetCorrection = 0
1252
+ result
1253
+ }
1250
1254
while (in.token == STRINGPART )
1251
- nextSegment(in. offset)
1255
+ nextSegment(offset)
1252
1256
if (in.token == STRINGLIT )
1253
- segmentBuf += literal(inPattern = inPattern, negOffset = in. offset, inStringInterpolation = true )
1257
+ segmentBuf += literal(inPattern = inPattern, negOffset = offset, inStringInterpolation = true )
1254
1258
1255
1259
InterpolatedString (interpolator, segmentBuf.toList)
1256
1260
}
You can’t perform that action at this time.
0 commit comments