File tree 3 files changed +3
-3
lines changed
scala/quoted/runtime/impl/printers
3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1253,7 +1253,7 @@ object Scanners {
1253
1253
nextChar()
1254
1254
}
1255
1255
}
1256
- val alt = if oct == LF then raw " \n " else f " \\ u $oct%04x "
1256
+ val alt = if oct == LF then raw " \n " else f " ${ " \\ " } u $oct%04x "
1257
1257
error(s " octal escape literals are unsupported: use $alt instead " , start)
1258
1258
putChar(oct.toChar)
1259
1259
}
Original file line number Diff line number Diff line change @@ -542,7 +542,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
542
542
case '"' => " \\\" "
543
543
case '\' ' => " \\\' "
544
544
case '\\ ' => " \\\\ "
545
- case _ => if ch.isControl then f " \\ u ${ch.toInt}%04x " else String .valueOf(ch)
545
+ case _ => if ch.isControl then f " ${ " \\ " } u ${ch.toInt}%04x " else String .valueOf(ch)
546
546
}
547
547
548
548
def toText (const : Constant ): Text = const.tag match {
Original file line number Diff line number Diff line change @@ -1423,7 +1423,7 @@ object SourceCode {
1423
1423
case '"' => " \\\" "
1424
1424
case '\' ' => " \\\' "
1425
1425
case '\\ ' => " \\\\ "
1426
- case _ => if ch.isControl then f " \\ u ${ch.toInt}%04x " else String .valueOf(ch)
1426
+ case _ => if ch.isControl then f " ${ " \\ " } u ${ch.toInt}%04x " else String .valueOf(ch)
1427
1427
}
1428
1428
1429
1429
private def escapedString (str : String ): String = str flatMap escapedChar
You can’t perform that action at this time.
0 commit comments