Skip to content

Commit 08c1ca9

Browse files
committed
latest syntax
1 parent 24d51fa commit 08c1ca9

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

lib/4.06.1/unstable/js_playground_compiler.ml

+8-4
Original file line numberDiff line numberDiff line change
@@ -289318,7 +289318,9 @@ val setup : unit lazy_t [@@live]
289318289318

289319289319
(* Needed for e.g. the playground to print typedtree data *)
289320289320
val printOutTypeDoc : Outcometree.out_type -> Res_doc.t [@@live]
289321-
val printOutSigItemDoc : Outcometree.out_sig_item -> Res_doc.t [@@live]
289321+
val printOutSigItemDoc :
289322+
?printNameAsIs:bool -> Outcometree.out_sig_item -> Res_doc.t
289323+
[@@live]
289322289324

289323289325
end = struct
289324289326
#1 "res_outcome_printer.ml"
@@ -289887,7 +289889,8 @@ let printTypeParameterDoc (typ, (co, cn)) =
289887289889
(if typ = "_" then Doc.text "_" else Doc.text ("'" ^ typ));
289888289890
]
289889289891

289890-
let rec printOutSigItemDoc (outSigItem : Outcometree.out_sig_item) =
289892+
let rec printOutSigItemDoc ?(printNameAsIs = false)
289893+
(outSigItem : Outcometree.out_sig_item) =
289891289894
match outSigItem with
289892289895
| Osig_class _ | Osig_class_type _ -> Doc.nil
289893289896
| Osig_ellipsis -> Doc.dotdotdot
@@ -290052,7 +290055,8 @@ let rec printOutSigItemDoc (outSigItem : Outcometree.out_sig_item) =
290052290055
[
290053290056
attrs;
290054290057
kw;
290055-
printIdentLike ~allowUident:false outTypeDecl.otype_name;
290058+
(if printNameAsIs then Doc.text outTypeDecl.otype_name
290059+
else printIdentLike ~allowUident:false outTypeDecl.otype_name);
290056290060
typeParams;
290057290061
kind;
290058290062
]);
@@ -290147,7 +290151,7 @@ and printOutSignatureDoc (signature : Outcometree.out_sig_item list) =
290147290151
let doc = printOutTypeExtensionDoc te in
290148290152
loop items (doc :: acc)
290149290153
| item :: items ->
290150-
let doc = printOutSigItemDoc item in
290154+
let doc = printOutSigItemDoc ~printNameAsIs:false item in
290151290155
loop items (doc :: acc)
290152290156
in
290153290157
match loop signature [] with

lib/4.06.1/whole_compiler.ml

+8-4
Original file line numberDiff line numberDiff line change
@@ -303744,7 +303744,9 @@ val setup : unit lazy_t [@@live]
303744303744

303745303745
(* Needed for e.g. the playground to print typedtree data *)
303746303746
val printOutTypeDoc : Outcometree.out_type -> Res_doc.t [@@live]
303747-
val printOutSigItemDoc : Outcometree.out_sig_item -> Res_doc.t [@@live]
303747+
val printOutSigItemDoc :
303748+
?printNameAsIs:bool -> Outcometree.out_sig_item -> Res_doc.t
303749+
[@@live]
303748303750

303749303751
end = struct
303750303752
#1 "res_outcome_printer.ml"
@@ -304313,7 +304315,8 @@ let printTypeParameterDoc (typ, (co, cn)) =
304313304315
(if typ = "_" then Doc.text "_" else Doc.text ("'" ^ typ));
304314304316
]
304315304317

304316-
let rec printOutSigItemDoc (outSigItem : Outcometree.out_sig_item) =
304318+
let rec printOutSigItemDoc ?(printNameAsIs = false)
304319+
(outSigItem : Outcometree.out_sig_item) =
304317304320
match outSigItem with
304318304321
| Osig_class _ | Osig_class_type _ -> Doc.nil
304319304322
| Osig_ellipsis -> Doc.dotdotdot
@@ -304478,7 +304481,8 @@ let rec printOutSigItemDoc (outSigItem : Outcometree.out_sig_item) =
304478304481
[
304479304482
attrs;
304480304483
kw;
304481-
printIdentLike ~allowUident:false outTypeDecl.otype_name;
304484+
(if printNameAsIs then Doc.text outTypeDecl.otype_name
304485+
else printIdentLike ~allowUident:false outTypeDecl.otype_name);
304482304486
typeParams;
304483304487
kind;
304484304488
]);
@@ -304573,7 +304577,7 @@ and printOutSignatureDoc (signature : Outcometree.out_sig_item list) =
304573304577
let doc = printOutTypeExtensionDoc te in
304574304578
loop items (doc :: acc)
304575304579
| item :: items ->
304576-
let doc = printOutSigItemDoc item in
304580+
let doc = printOutSigItemDoc ~printNameAsIs:false item in
304577304581
loop items (doc :: acc)
304578304582
in
304579304583
match loop signature [] with

0 commit comments

Comments
 (0)