Skip to content

Commit 080a000

Browse files
committed
dune fmt
1 parent 41420c6 commit 080a000

File tree

5 files changed

+22
-9
lines changed

5 files changed

+22
-9
lines changed

jscomp/gentype/TranslateStructure.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ let rec addAnnotationsToTypes_ ~config ~(expr : Typedtree.expression)
66
| ( Texp_function {arg_label; param; cases = [{c_rhs}]},
77
_,
88
{a_type} :: next_types ) ->
9-
let next_types1 = next_types |> addAnnotationsToTypes_ ~config ~expr:c_rhs in
9+
let next_types1 =
10+
next_types |> addAnnotationsToTypes_ ~config ~expr:c_rhs
11+
in
1012
let a_name = Ident.name param in
1113
let _ = Printtyped.implementation in
1214
let a_name =

jscomp/syntax/src/jsx_ppx.ml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,16 @@ let process_config_attribute attribute config =
7272
if is_jsx_config_attr attribute then update_config config (snd attribute)
7373

7474
let get_mapper ~config =
75-
let expr3, module_binding3, transform_signature_item3, transform_structure_item3 =
75+
let ( expr3,
76+
module_binding3,
77+
transform_signature_item3,
78+
transform_structure_item3 ) =
7679
Reactjs_jsx_v3.jsx_mapper ~config
7780
in
78-
let expr4, module_binding4, transform_signature_item4, transform_structure_item4 =
81+
let ( expr4,
82+
module_binding4,
83+
transform_signature_item4,
84+
transform_structure_item4 ) =
7985
Jsx_v4.jsx_mapper ~config
8086
in
8187

jscomp/syntax/src/jsx_v4.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,8 +1354,8 @@ let transform_jsx_call ~config mapper call_expression call_arguments
13541354
"JSX: `createElement` should be preceeded by a module name."
13551355
(* Foo.createElement(~prop1=foo, ~prop2=bar, ~children=[], ()) *)
13561356
| {loc; txt = Ldot (module_path, ("createElement" | "make"))} ->
1357-
transform_uppercase_call3 ~config module_path mapper jsx_expr_loc loc attrs
1358-
call_arguments
1357+
transform_uppercase_call3 ~config module_path mapper jsx_expr_loc loc
1358+
attrs call_arguments
13591359
(* div(~prop1=foo, ~prop2=bar, ~children=[bla], ()) *)
13601360
(* turn that into
13611361
ReactDOM.createElement(~props=ReactDOM.props(~props1=foo, ~props2=bar, ()), [|bla|]) *)

jscomp/syntax/src/res_core.ml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2148,8 +2148,9 @@ and parse_operand_expr ~context p =
21482148
Arrow expressions could be of the form: `async (): int => stuff()`
21492149
But if we're in a ternary, the `:` of the ternary takes precedence
21502150
*)
2151-
when is_es6_arrow_expression ~in_ternary:(context = TernaryTrueBranchExpr) p
2152-
->
2151+
when is_es6_arrow_expression
2152+
~in_ternary:(context = TernaryTrueBranchExpr)
2153+
p ->
21532154
let arrow_attrs = !attrs in
21542155
let () = attrs := [] in
21552156
parse_async_arrow_expression ~arrow_attrs p
@@ -2162,7 +2163,9 @@ and parse_operand_expr ~context p =
21622163
| _ ->
21632164
if
21642165
context != WhenExpr
2165-
&& is_es6_arrow_expression ~in_ternary:(context = TernaryTrueBranchExpr) p
2166+
&& is_es6_arrow_expression
2167+
~in_ternary:(context = TernaryTrueBranchExpr)
2168+
p
21662169
then
21672170
let arrow_attrs = !attrs in
21682171
let () = attrs := [] in

jscomp/syntax/src/res_printer.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4714,7 +4714,9 @@ and print_arguments_with_callback_in_last_position ~state ~dotted args cmt_tbl =
47144714
* (param1, parm2) => doStuff(param1, parm2)
47154715
* )
47164716
*)
4717-
let break_all_args = lazy (print_arguments ~state ~dotted args cmt_tbl_copy2) in
4717+
let break_all_args =
4718+
lazy (print_arguments ~state ~dotted args cmt_tbl_copy2)
4719+
in
47184720

47194721
(* Sometimes one of the non-callback arguments will break.
47204722
* There might be a single line comment in there, or a multiline string etc.

0 commit comments

Comments
 (0)