@@ -65323,7 +65323,7 @@ and expression_desc =
6532365323 it will be true when it's a method
6532465324 The last pararemter [true] return unit
6532565325 *)
65326- | Str of {pure: bool ; txt: string}
65326+ | Str of {delim: string option ; txt: string}
6532765327 (* A string is UTF-8 encoded, and may contain
6532865328 escape sequences.
6532965329 *)
@@ -66384,7 +66384,7 @@ let super : iter =
6638466384 block;
6638566385 program;
6638666386 }
66387-
66387+
6638866388end
6638966389module Js_analyzer : sig
6639066390#1 "js_analyzer.mli"
@@ -66556,7 +66556,7 @@ let rec no_side_effect_expression_desc (x : J.expression_desc) =
6655666556 | String_index (a, b) | Array_index (a, b) ->
6655766557 no_side_effect a && no_side_effect b
6655866558 | Is_null_or_undefined b -> no_side_effect b
66559- | Str {pure} -> pure
66559+ | Str _ -> true
6656066560 | Array (xs, _mutable_flag) | Caml_block (xs, _mutable_flag, _, _) ->
6656166561 (* create [immutable] block,
6656266562 does not really mean that this opreation itself is [pure].
@@ -66647,8 +66647,8 @@ let rec eq_expression ({ expression_desc = x0 } : J.expression)
6664766647 | Bin (op1, a1, b1) ->
6664866648 op0 = op1 && eq_expression a0 a1 && eq_expression b0 b1
6664966649 | _ -> false)
66650- | Str {pure =a0; txt=b0} -> (
66651- match y0 with Str {pure =a1; txt=b1} -> a0 = a1 && b0 = b1 | _ -> false)
66650+ | Str {delim =a0; txt=b0} -> (
66651+ match y0 with Str {delim =a1; txt=b1} -> a0 = a1 && b0 = b1 | _ -> false)
6665266652 | Static_index (e0, p0, off0) -> (
6665366653 match y0 with
6665466654 | Static_index (e1, p1, off1) ->
@@ -66982,7 +66982,7 @@ val pure_runtime_call :
6698266982
6698366983val runtime_ref : string -> string -> t
6698466984
66985- val str : ?pure:bool -> ?comment:string -> string -> t
66985+ val str : ?delim: string option -> ?comment: string -> string -> t
6698666986
6698766987val unicode : ?comment:string -> string -> t
6698866988
@@ -67370,8 +67370,8 @@ let pure_runtime_call module_name fn_name args =
6737067370
6737167371let runtime_ref module_name fn_name = runtime_var_dot module_name fn_name
6737267372
67373- let str ?(pure = true ) ?comment s : t =
67374- { expression_desc = Str {pure; txt=s }; comment }
67373+ let str ?(delim = None ) ?comment txt : t =
67374+ { expression_desc = Str {txt; delim }; comment }
6737567375
6737667376let unicode ?comment s : t = { expression_desc = Unicode s; comment }
6737767377
@@ -69756,11 +69756,12 @@ and expression_desc cxt ~(level : int) f x : cxt =
6975669756 P.string f s;
6975769757 P.string f "\"";
6975869758 cxt
69759- | Str {txt} ->
69759+ | Str {delim; txt} ->
6976069760 (*TODO --
6976169761 when utf8-> it will not escape '\\' which is definitely not we want
6976269762 *)
69763- Js_dump_string.pp_string f txt;
69763+ if delim <> None then P.string f ("\"" ^ txt ^ "\"")
69764+ else Js_dump_string.pp_string f txt;
6976469765 cxt
6976569766 | Raw_js_code { code = s; code_info = info } -> (
6976669767 match info with
@@ -79577,7 +79578,7 @@ let super : iter =
7957779578 block;
7957879579 program;
7957979580 }
79580-
79581+
7958179582end
7958279583module Js_pass_flatten : sig
7958379584#1 "js_pass_flatten.mli"
@@ -80361,7 +80362,7 @@ let super : 'state iter =
8036180362 block;
8036280363 program;
8036380364 }
80364-
80365+
8036580366end
8036680367module Js_pass_scope : sig
8036780368#1 "js_pass_scope.mli"
0 commit comments