Skip to content

Commit

Permalink
[interpreter] Add missing escapes in string printer (#1772)
Browse files Browse the repository at this point in the history
  • Loading branch information
zapashcanon committed Aug 1, 2024
1 parent 1291af3 commit 351d8b1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions interpreter/text/arrange.ml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ let nat32 = I32.to_string_u
let add_hex_char buf c = Printf.bprintf buf "\\%02x" (Char.code c)
let add_char buf = function
| '\n' -> Buffer.add_string buf "\\n"
| '\r' -> Buffer.add_string buf "\\r"
| '\t' -> Buffer.add_string buf "\\t"
| '\'' -> Buffer.add_string buf "\\'"
| '\"' -> Buffer.add_string buf "\\\""
| '\\' -> Buffer.add_string buf "\\\\"
| c when '\x20' <= c && c < '\x7f' -> Buffer.add_char buf c
Expand Down

0 comments on commit 351d8b1

Please sign in to comment.