# HG changeset patch # User Christian Urban # Date 1729227544 -3600 # Node ID 1d4659dd83fe1e5ad1685c7441f0395404617040 # Parent 0dfa2923a7c6f198fd8f9d745cd8adae3e2e6216 updated diff -r 0dfa2923a7c6 -r 1d4659dd83fe progs/lexer/lexer.sc --- a/progs/lexer/lexer.sc Fri Oct 18 05:45:14 2024 +0100 +++ b/progs/lexer/lexer.sc Fri Oct 18 05:59:04 2024 +0100 @@ -238,9 +238,7 @@ // escapes strings and prints them out as "", "\n" and so on def esc(raw: String): String = { - raw - //import scala.reflect.runtime.universe._ - //Literal(Constant(raw)).toString + "\"" + raw.replaceAll("\\n", "\\\\n").replaceAll ("\\t", "\\\\t") + "\"" } def escape(tks: List[(String, String)]) =