File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1245,12 +1245,16 @@ object Parsers {
12451245 }
12461246 })
12471247
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+ }
12501254 while (in.token == STRINGPART )
1251- nextSegment(in. offset)
1255+ nextSegment(offset)
12521256 if (in.token == STRINGLIT )
1253- segmentBuf += literal(inPattern = inPattern, negOffset = in. offset, inStringInterpolation = true )
1257+ segmentBuf += literal(inPattern = inPattern, negOffset = offset, inStringInterpolation = true )
12541258
12551259 InterpolatedString (interpolator, segmentBuf.toList)
12561260 }
You can’t perform that action at this time.
0 commit comments