Skip to content

Commit 351d8b1

Browse files
authored
[interpreter] Add missing escapes in string printer (#1772)
1 parent 1291af3 commit 351d8b1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

interpreter/text/arrange.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ let nat32 = I32.to_string_u
1414
let add_hex_char buf c = Printf.bprintf buf "\\%02x" (Char.code c)
1515
let add_char buf = function
1616
| '\n' -> Buffer.add_string buf "\\n"
17+
| '\r' -> Buffer.add_string buf "\\r"
1718
| '\t' -> Buffer.add_string buf "\\t"
19+
| '\'' -> Buffer.add_string buf "\\'"
1820
| '\"' -> Buffer.add_string buf "\\\""
1921
| '\\' -> Buffer.add_string buf "\\\\"
2022
| c when '\x20' <= c && c < '\x7f' -> Buffer.add_char buf c

0 commit comments

Comments
 (0)