@@ -244961,7 +244961,7 @@ and for_ident = ident
244961244961and for_direction = Js_op.direction_flag
244962244962and property_map = (property_name * expression) list
244963244963and length_object = Js_op.length_object
244964- and delim = | Nothing | J | JS | StarJ | Json
244964+ and delim = | DNone | DJ | DJS | DStarJ | DJson
244965244965
244966244966and expression_desc =
244967244967 | Length of expression * length_object
@@ -253090,7 +253090,7 @@ let pure_runtime_call module_name fn_name args =
253090253090
253091253091let runtime_ref module_name fn_name = runtime_var_dot module_name fn_name
253092253092
253093- let str ?(delim = J.Nothing ) ?comment txt : t =
253093+ let str ?(delim = J.DNone ) ?comment txt : t =
253094253094 { expression_desc = Str { txt; delim }; comment }
253095253095
253096253096let raw_js_code ?comment info s : t =
@@ -253454,7 +253454,7 @@ let array_length ?comment (e : t) : t =
253454253454
253455253455let string_length ?comment (e : t) : t =
253456253456 match e.expression_desc with
253457- | Str { txt; delim = Nothing } -> int ?comment (Int32.of_int (String.length txt))
253457+ | Str { txt; delim = DNone } -> int ?comment (Int32.of_int (String.length txt))
253458253458 (* No optimization for {j||j}*)
253459253459 | _ -> { expression_desc = Length (e, String); comment }
253460253460
@@ -255502,9 +255502,9 @@ and expression_desc cxt ~(level : int) f x : cxt =
255502255502 (*TODO --
255503255503 when utf8-> it will not escape '\\' which is definitely not we want
255504255504 *)
255505- if delim = J || delim = StarJ then
255505+ if delim = DJ || delim = DStarJ then
255506255506 P.string f ("\"" ^ txt ^ "\"")
255507- else if delim = Json then P.string f txt
255507+ else if delim = DJson then P.string f txt
255508255508 else Js_dump_string.pp_string f txt;
255509255509 cxt
255510255510 | Raw_js_code { code = s; code_info = info } -> (
@@ -264330,7 +264330,7 @@ and translate (x : Lam_constant.t) : J.expression =
264330264330 (* https://github.com/google/closure-library/blob/master/closure%2Fgoog%2Fmath%2Flong.js *)
264331264331 | Const_float f -> E.float f (* TODO: preserve float *)
264332264332 | Const_string { s; unicode = false } -> E.str s
264333- | Const_string { s; unicode = true } -> E.str ~delim:J s
264333+ | Const_string { s; unicode = true } -> E.str ~delim:DJ s
264334264334 | Const_pointer name -> E.str name
264335264335 | Const_block (tag, tag_info, xs) ->
264336264336 Js_of_lam_block.make_block NA tag_info (E.small_int tag)
@@ -276249,9 +276249,9 @@ type as_const_payload = Int of int | Str of string * J.delim
276249276249let iter_process_bs_string_or_int_as (attrs : Parsetree.attributes) =
276250276250 let st = ref None in
276251276251 let process_delim = function
276252- | None -> Some J.Nothing
276253- | Some "json" -> Some Json
276254- | Some "*j" -> Some StarJ
276252+ | None -> Some J.DNone
276253+ | Some "json" -> Some DJson
276254+ | Some "*j" -> Some DStarJ
276255276255 | _ -> None
276256276256 in
276257276257 Ext_list.iter attrs (fun (({ txt; loc }, payload) as attr) ->
@@ -276284,7 +276284,7 @@ let iter_process_bs_string_or_int_as (attrs : Parsetree.attributes) =
276284276284 | Some delim -> delim
276285276285 in
276286276286 st := Some (Str (s, delim));
276287- if delim = Json then
276287+ if delim = DJson then
276288276288 (* check that it is a valid object literal *)
276289276289 match
276290276290 Classify_function.classify
0 commit comments