summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Norton2018-11-21 11:29:33 +0000
committerRobert Norton2018-11-21 11:29:33 +0000
commitf4affce812cdc1762ac2617682f813f1f34ab6b4 (patch)
tree1f3a0a4aa29f6b6bcc69c1ec0cf6bb06235dc732 /src
parent5705c13d1dbe98ee63acc75a0436128e2a7de6e8 (diff)
Escape strings literals in lem pretty printer.
Diffstat (limited to 'src')
-rw-r--r--src/pretty_print_lem.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pretty_print_lem.ml b/src/pretty_print_lem.ml
index 1afc0e50..779d81f8 100644
--- a/src/pretty_print_lem.ml
+++ b/src/pretty_print_lem.ml
@@ -391,7 +391,7 @@ let doc_lit_lem (L_aux(lit,l)) =
| L_bin n -> failwith "Shouldn't happen" (*"(num_to_vec " ^ ("0b" ^ n) ^ ")" (*shouldn't happen*)*)
| L_undef ->
utf8string "(return (failwith \"undefined value of unsupported type\"))"
- | L_string s -> utf8string ("\"" ^ s ^ "\"")
+ | L_string s -> utf8string ("\"" ^ (String.escaped s) ^ "\"")
| L_real s ->
(* Lem does not support decimal syntax, so we translate a string
of the form "x.y" into the ratio (x * 10^len(y) + y) / 10^len(y).