ML_Syntax.print_char: more readable output of some well-known ASCII controls -- this is relevant for ML toplevel pp;
authorwenzelm
Fri, 17 Sep 2010 22:42:07 +0200
changeset 39514 d9cf3f833318
parent 39513 fce2202892c4
child 39515 57ceabb0bb8e
ML_Syntax.print_char: more readable output of some well-known ASCII controls -- this is relevant for ML toplevel pp;
src/Pure/ML/ml_syntax.ML
--- a/src/Pure/ML/ml_syntax.ML	Fri Sep 17 22:17:57 2010 +0200
+++ b/src/Pure/ML/ml_syntax.ML	Fri Sep 17 22:42:07 2010 +0200
@@ -62,6 +62,9 @@
   if not (Symbol.is_char s) then s
   else if s = "\"" then "\\\""
   else if s = "\\" then "\\\\"
+  else if s = "\t" then "\\t"
+  else if s = "\n" then "\\n"
+  else if s = "\r" then "\\r"
   else
     let val c = ord s in
       if c < 32 then "\\^" ^ chr (c + ord "@")