Tbh, I am not 100% sure about all the implications of removing the \x escaping on regular strings on the generated JS. But no tests were exercizing this case (otherwise they would have broken) and there are options available in case this feature was used: there are much more explicit alternatives to manipulate sequences of bytes than using strings, like Bytes.t in OCaml or ArrayBuffer which could be consumed in Melange through bindings.
The only caveat is that locations seem to be broken when unicode strings are used, but this seemed to be the case already before the changes in this PR, as the first commit shows.
Fixes #1141.
Tbh, I am not 100% sure about all the implications of removing the
\x
escaping on regular strings on the generated JS. But no tests were exercizing this case (otherwise they would have broken) and there are options available in case this feature was used: there are much more explicit alternatives to manipulate sequences of bytes than using strings, likeBytes.t
in OCaml orArrayBuffer
which could be consumed in Melange through bindings.The only caveat is that locations seem to be broken when unicode strings are used, but this seemed to be the case already before the changes in this PR, as the first commit shows.