File tree Expand file tree Collapse file tree 1 file changed +14
-16
lines changed Expand file tree Collapse file tree 1 file changed +14
-16
lines changed Original file line number Diff line number Diff line change @@ -2916,21 +2916,18 @@ and fmt_expression c ?(box = true) ?(pro = noop) ?eol ?parens
2916
2916
$ fmt_atrs
2917
2917
2918
2918
and fmt_lazy c ~ctx ?(pro = noop) ~fmt_atrs ~ext ~parens e =
2919
- let lazy_ = str " lazy" $ fmt_extension_suffix c ext in
2920
- match e with
2921
- | {pexp_desc = Pexp_beginend _ ; _} as e ->
2922
- pro
2923
- $ hvbox 2
2924
- (Params.Exp. wrap c.conf ~parens
2925
- ( fmt_expression c ~pro: (lazy_ $ str " " ) (sub_exp ~ctx e)
2926
- $ fmt_atrs ) )
2927
- | _ ->
2928
- pro
2929
- $ hvbox 2
2930
- (Params.Exp. wrap c.conf ~parens
2931
- ( lazy_ $ space_break
2932
- $ fmt_expression c (sub_exp ~ctx e)
2933
- $ fmt_atrs ) )
2919
+ let lazy_ = str " lazy" $ fmt_extension_suffix c ext $ space_break in
2920
+ let kw_outer, kw_inner =
2921
+ match e.pexp_desc with
2922
+ | Pexp_beginend _ -> (noop, lazy_)
2923
+ | _ -> (lazy_, noop)
2924
+ in
2925
+ pro
2926
+ $ hvbox 2
2927
+ (Params.Exp. wrap c.conf ~parens
2928
+ ( kw_outer
2929
+ $ fmt_expression c ~pro: kw_inner (sub_exp ~ctx e)
2930
+ $ fmt_atrs ) )
2934
2931
2935
2932
and fmt_beginend c ~loc ?(box = true ) ?(pro = noop) ~ctx ~fmt_atrs ~ext
2936
2933
~indent_wrap ?eol e =
@@ -2962,7 +2959,8 @@ and fmt_beginend c ~loc ?(box = true) ?(pro = noop) ~ctx ~fmt_atrs ~ext
2962
2959
$ break 1 0 $ end_ )
2963
2960
| _ ->
2964
2961
hvbox 0
2965
- ( pro $ hvbox 0 begin_ $ break 1 2
2962
+ ( hvbox 0 (pro $ begin_)
2963
+ $ break 1 2
2966
2964
$ fmt_expression c ~box ?eol ~parens: false ~indent_wrap
2967
2965
(sub_exp ~ctx e)
2968
2966
$ force_break $ end_ )
You can’t perform that action at this time.
0 commit comments