Skip to content

Commit 5762ffc

Browse files
committed
rename
1 parent a8a5f65 commit 5762ffc

8 files changed

+40
-40
lines changed

jscomp/core/j.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ and for_ident = ident
7676
and for_direction = Js_op.direction_flag
7777
and property_map = (property_name * expression) list
7878
and length_object = Js_op.length_object
79-
and delim = | Nothing | J | JS | StarJ | Json
79+
and delim = | DNone | DJ | DJS | DStarJ | DJson
8080

8181
and expression_desc =
8282
| Length of expression * length_object

jscomp/core/js_dump.ml

+2-2
Original file line numberDiff line numberDiff line change
@@ -597,9 +597,9 @@ and expression_desc cxt ~(level : int) f x : cxt =
597597
(*TODO --
598598
when utf8-> it will not escape '\\' which is definitely not we want
599599
*)
600-
if delim = J || delim = StarJ then
600+
if delim = DJ || delim = DStarJ then
601601
P.string f ("\"" ^ txt ^ "\"")
602-
else if delim = Json then P.string f txt
602+
else if delim = DJson then P.string f txt
603603
else Js_dump_string.pp_string f txt;
604604
cxt
605605
| Raw_js_code { code = s; code_info = info } -> (

jscomp/core/js_exp_make.ml

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ let pure_runtime_call module_name fn_name args =
123123

124124
let runtime_ref module_name fn_name = runtime_var_dot module_name fn_name
125125

126-
let str ?(delim = J.Nothing) ?comment txt : t =
126+
let str ?(delim = J.DNone) ?comment txt : t =
127127
{ expression_desc = Str { txt; delim }; comment }
128128

129129
let raw_js_code ?comment info s : t =
@@ -487,7 +487,7 @@ let array_length ?comment (e : t) : t =
487487

488488
let string_length ?comment (e : t) : t =
489489
match e.expression_desc with
490-
| Str { txt; delim = Nothing } -> int ?comment (Int32.of_int (String.length txt))
490+
| Str { txt; delim = DNone } -> int ?comment (Int32.of_int (String.length txt))
491491
(* No optimization for {j||j}*)
492492
| _ -> { expression_desc = Length (e, String); comment }
493493

jscomp/core/lam_compile_const.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ and translate (x : Lam_constant.t) : J.expression =
7171
(* https://github.com/google/closure-library/blob/master/closure%2Fgoog%2Fmath%2Flong.js *)
7272
| Const_float f -> E.float f (* TODO: preserve float *)
7373
| Const_string { s; unicode = false } -> E.str s
74-
| Const_string { s; unicode = true } -> E.str ~delim:J s
74+
| Const_string { s; unicode = true } -> E.str ~delim:DJ s
7575
| Const_pointer name -> E.str name
7676
| Const_block (tag, tag_info, xs) ->
7777
Js_of_lam_block.make_block NA tag_info (E.small_int tag)

jscomp/frontend/ast_attributes.ml

+4-4
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,9 @@ type as_const_payload = Int of int | Str of string * J.delim
283283
let iter_process_bs_string_or_int_as (attrs : Parsetree.attributes) =
284284
let st = ref None in
285285
let process_delim = function
286-
| None -> Some J.Nothing
287-
| Some "json" -> Some Json
288-
| Some "*j" -> Some StarJ
286+
| None -> Some J.DNone
287+
| Some "json" -> Some DJson
288+
| Some "*j" -> Some DStarJ
289289
| _ -> None
290290
in
291291
Ext_list.iter attrs (fun (({ txt; loc }, payload) as attr) ->
@@ -318,7 +318,7 @@ let iter_process_bs_string_or_int_as (attrs : Parsetree.attributes) =
318318
| Some delim -> delim
319319
in
320320
st := Some (Str (s, delim));
321-
if delim = Json then
321+
if delim = DJson then
322322
(* check that it is a valid object literal *)
323323
match
324324
Classify_function.classify

lib/4.06.1/unstable/js_compiler.ml

+10-10
Original file line numberDiff line numberDiff line change
@@ -75026,7 +75026,7 @@ and for_ident = ident
7502675026
and for_direction = Js_op.direction_flag
7502775027
and property_map = (property_name * expression) list
7502875028
and length_object = Js_op.length_object
75029-
and delim = | Nothing | J | JS | StarJ | Json
75029+
and delim = | DNone | DJ | DJS | DStarJ | DJson
7503075030

7503175031
and expression_desc =
7503275032
| Length of expression * length_object
@@ -77133,7 +77133,7 @@ let pure_runtime_call module_name fn_name args =
7713377133

7713477134
let runtime_ref module_name fn_name = runtime_var_dot module_name fn_name
7713577135

77136-
let str ?(delim = J.Nothing) ?comment txt : t =
77136+
let str ?(delim = J.DNone) ?comment txt : t =
7713777137
{ expression_desc = Str { txt; delim }; comment }
7713877138

7713977139
let raw_js_code ?comment info s : t =
@@ -77497,7 +77497,7 @@ let array_length ?comment (e : t) : t =
7749777497

7749877498
let string_length ?comment (e : t) : t =
7749977499
match e.expression_desc with
77500-
| Str { txt; delim = Nothing } -> int ?comment (Int32.of_int (String.length txt))
77500+
| Str { txt; delim = DNone } -> int ?comment (Int32.of_int (String.length txt))
7750177501
(* No optimization for {j||j}*)
7750277502
| _ -> { expression_desc = Length (e, String); comment }
7750377503

@@ -79545,9 +79545,9 @@ and expression_desc cxt ~(level : int) f x : cxt =
7954579545
(*TODO --
7954679546
when utf8-> it will not escape '\\' which is definitely not we want
7954779547
*)
79548-
if delim = J || delim = StarJ then
79548+
if delim = DJ || delim = DStarJ then
7954979549
P.string f ("\"" ^ txt ^ "\"")
79550-
else if delim = Json then P.string f txt
79550+
else if delim = DJson then P.string f txt
7955179551
else Js_dump_string.pp_string f txt;
7955279552
cxt
7955379553
| Raw_js_code { code = s; code_info = info } -> (
@@ -94970,7 +94970,7 @@ and translate (x : Lam_constant.t) : J.expression =
9497094970
(* https://github.com/google/closure-library/blob/master/closure%2Fgoog%2Fmath%2Flong.js *)
9497194971
| Const_float f -> E.float f (* TODO: preserve float *)
9497294972
| Const_string { s; unicode = false } -> E.str s
94973-
| Const_string { s; unicode = true } -> E.str ~delim:J s
94973+
| Const_string { s; unicode = true } -> E.str ~delim:DJ s
9497494974
| Const_pointer name -> E.str name
9497594975
| Const_block (tag, tag_info, xs) ->
9497694976
Js_of_lam_block.make_block NA tag_info (E.small_int tag)
@@ -264407,9 +264407,9 @@ type as_const_payload = Int of int | Str of string * J.delim
264407264407
let iter_process_bs_string_or_int_as (attrs : Parsetree.attributes) =
264408264408
let st = ref None in
264409264409
let process_delim = function
264410-
| None -> Some J.Nothing
264411-
| Some "json" -> Some Json
264412-
| Some "*j" -> Some StarJ
264410+
| None -> Some J.DNone
264411+
| Some "json" -> Some DJson
264412+
| Some "*j" -> Some DStarJ
264413264413
| _ -> None
264414264414
in
264415264415
Ext_list.iter attrs (fun (({ txt; loc }, payload) as attr) ->
@@ -264442,7 +264442,7 @@ let iter_process_bs_string_or_int_as (attrs : Parsetree.attributes) =
264442264442
| Some delim -> delim
264443264443
in
264444264444
st := Some (Str (s, delim));
264445-
if delim = Json then
264445+
if delim = DJson then
264446264446
(* check that it is a valid object literal *)
264447264447
match
264448264448
Classify_function.classify

lib/4.06.1/unstable/js_playground_compiler.ml

+10-10
Original file line numberDiff line numberDiff line change
@@ -75026,7 +75026,7 @@ and for_ident = ident
7502675026
and for_direction = Js_op.direction_flag
7502775027
and property_map = (property_name * expression) list
7502875028
and length_object = Js_op.length_object
75029-
and delim = | Nothing | J | JS | StarJ | Json
75029+
and delim = | DNone | DJ | DJS | DStarJ | DJson
7503075030

7503175031
and expression_desc =
7503275032
| Length of expression * length_object
@@ -77133,7 +77133,7 @@ let pure_runtime_call module_name fn_name args =
7713377133

7713477134
let runtime_ref module_name fn_name = runtime_var_dot module_name fn_name
7713577135

77136-
let str ?(delim = J.Nothing) ?comment txt : t =
77136+
let str ?(delim = J.DNone) ?comment txt : t =
7713777137
{ expression_desc = Str { txt; delim }; comment }
7713877138

7713977139
let raw_js_code ?comment info s : t =
@@ -77497,7 +77497,7 @@ let array_length ?comment (e : t) : t =
7749777497

7749877498
let string_length ?comment (e : t) : t =
7749977499
match e.expression_desc with
77500-
| Str { txt; delim = Nothing } -> int ?comment (Int32.of_int (String.length txt))
77500+
| Str { txt; delim = DNone } -> int ?comment (Int32.of_int (String.length txt))
7750177501
(* No optimization for {j||j}*)
7750277502
| _ -> { expression_desc = Length (e, String); comment }
7750377503

@@ -79545,9 +79545,9 @@ and expression_desc cxt ~(level : int) f x : cxt =
7954579545
(*TODO --
7954679546
when utf8-> it will not escape '\\' which is definitely not we want
7954779547
*)
79548-
if delim = J || delim = StarJ then
79548+
if delim = DJ || delim = DStarJ then
7954979549
P.string f ("\"" ^ txt ^ "\"")
79550-
else if delim = Json then P.string f txt
79550+
else if delim = DJson then P.string f txt
7955179551
else Js_dump_string.pp_string f txt;
7955279552
cxt
7955379553
| Raw_js_code { code = s; code_info = info } -> (
@@ -94970,7 +94970,7 @@ and translate (x : Lam_constant.t) : J.expression =
9497094970
(* https://github.com/google/closure-library/blob/master/closure%2Fgoog%2Fmath%2Flong.js *)
9497194971
| Const_float f -> E.float f (* TODO: preserve float *)
9497294972
| Const_string { s; unicode = false } -> E.str s
94973-
| Const_string { s; unicode = true } -> E.str ~delim:J s
94973+
| Const_string { s; unicode = true } -> E.str ~delim:DJ s
9497494974
| Const_pointer name -> E.str name
9497594975
| Const_block (tag, tag_info, xs) ->
9497694976
Js_of_lam_block.make_block NA tag_info (E.small_int tag)
@@ -265870,9 +265870,9 @@ type as_const_payload = Int of int | Str of string * J.delim
265870265870
let iter_process_bs_string_or_int_as (attrs : Parsetree.attributes) =
265871265871
let st = ref None in
265872265872
let process_delim = function
265873-
| None -> Some J.Nothing
265874-
| Some "json" -> Some Json
265875-
| Some "*j" -> Some StarJ
265873+
| None -> Some J.DNone
265874+
| Some "json" -> Some DJson
265875+
| Some "*j" -> Some DStarJ
265876265876
| _ -> None
265877265877
in
265878265878
Ext_list.iter attrs (fun (({ txt; loc }, payload) as attr) ->
@@ -265905,7 +265905,7 @@ let iter_process_bs_string_or_int_as (attrs : Parsetree.attributes) =
265905265905
| Some delim -> delim
265906265906
in
265907265907
st := Some (Str (s, delim));
265908-
if delim = Json then
265908+
if delim = DJson then
265909265909
(* check that it is a valid object literal *)
265910265910
match
265911265911
Classify_function.classify

lib/4.06.1/whole_compiler.ml

+10-10
Original file line numberDiff line numberDiff line change
@@ -244961,7 +244961,7 @@ and for_ident = ident
244961244961
and for_direction = Js_op.direction_flag
244962244962
and property_map = (property_name * expression) list
244963244963
and length_object = Js_op.length_object
244964-
and delim = | Nothing | J | JS | StarJ | Json
244964+
and delim = | DNone | DJ | DJS | DStarJ | DJson
244965244965

244966244966
and expression_desc =
244967244967
| Length of expression * length_object
@@ -253090,7 +253090,7 @@ let pure_runtime_call module_name fn_name args =
253090253090

253091253091
let 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

253096253096
let raw_js_code ?comment info s : t =
@@ -253454,7 +253454,7 @@ let array_length ?comment (e : t) : t =
253454253454

253455253455
let 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
276249276249
let 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

Comments
 (0)