Skip to content

Commit 836a1ee

Browse files
committed
Switch from %(%) to %t
1 parent a685ccb commit 836a1ee

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ocaml/parsing/pprintast.ml

+6-4
Original file line numberDiff line numberDiff line change
@@ -1766,14 +1766,16 @@ and type_def_list ctxt f (rf, exported, l) =
17661766
(list ~sep:"@," (type_decl "and" Recursive)) xs
17671767

17681768
and record_declaration ctxt f lbls =
1769-
let pld_mode_type_attrs pld : _ format6 * _ =
1769+
let pld_mode_type_attrs pld =
17701770
match Jane_syntax.Constructor_argument.of_ast pld.pld_type with
1771-
| Some (Jcarg_local (Lcarg_global carg)) -> "global_@;", carg
1772-
| None -> "", pld.pld_type
1771+
| Some (Jcarg_local (Lcarg_global carg)) ->
1772+
(fun f -> pp f "global_@;"), carg
1773+
| None ->
1774+
(fun _ -> ()), pld.pld_type
17731775
in
17741776
let type_record_field f pld =
17751777
let mode_flag, pld_type = pld_mode_type_attrs pld in
1776-
pp f "@[<2>%a%(%)%s:@;%a@;%a@]"
1778+
pp f "@[<2>%a%t%s:@;%a@;%a@]"
17771779
mutable_flag pld.pld_mutable
17781780
mode_flag
17791781
pld.pld_name.txt

0 commit comments

Comments
 (0)