Manque escape sur une chaîne et un retour charriot dans un format.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2816 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Pierre Weis 2000-02-14 15:00:47 +00:00
parent 3b460278e0
commit bce65fcf54
1 changed files with 3 additions and 2 deletions

View File

@ -38,7 +38,8 @@ let fmt_constant f x =
match x with
| Const_int (i) -> Format.fprintf f "Const_int %d" i;
| Const_char (c) -> Format.fprintf f "Const_char %02x" (Char.code c);
| Const_string (s) -> Format.fprintf f "Const_string \"%s\"" s;
| Const_string (s) ->
Format.fprintf f "Const_string \"%s\"" (String.escaped s);
| Const_float (s) -> Format.fprintf f "Const_float %s" s;
;;
@ -88,7 +89,7 @@ let option i f x =
f (i+1) x;
;;
let longident i li = line i "%a" fmt_longident li;;
let longident i li = line i "%a\n" fmt_longident li;;
let string i s = line i "\"%s\"\n" s;;
let bool i x = line i "%s\n" (string_of_bool x);;
let label i x = line i "label=\"%s\"\n" x;;