@@ -4553,7 +4553,10 @@ and print_jsx_props ~state args cmt_tbl : Doc.t * Parsetree.expression option =
45534553and print_jsx_prop ~state arg cmt_tbl =
45544554 match arg with
45554555 | ( ((Asttypes. Lbl {txt = lbl_txt} | Opt {txt = lbl_txt}) as lbl),
4556- {pexp_desc = Pexp_ident {txt = Longident. Lident ident}} )
4556+ {
4557+ pexp_attributes = [] ;
4558+ pexp_desc = Pexp_ident {txt = Longident. Lident ident};
4559+ } )
45574560 when lbl_txt = ident (* jsx punning *) -> (
45584561 match lbl with
45594562 | Nolbl -> Doc. nil
@@ -4878,7 +4881,10 @@ and print_argument ~state (arg_lbl, arg) cmt_tbl =
48784881 match (arg_lbl, arg) with
48794882 (* ~a (punned)*)
48804883 | ( Lbl {txt = lbl; loc = l0},
4881- {pexp_desc = Pexp_ident {txt = Longident. Lident name}} )
4884+ {
4885+ pexp_attributes = [] ;
4886+ pexp_desc = Pexp_ident {txt = Longident. Lident name};
4887+ } )
48824888 when lbl = name && not (ParsetreeViewer. is_braced_expr arg) ->
48834889 let loc = {l0 with loc_end = arg.pexp_loc.loc_end} in
48844890 let doc = Doc. concat [Doc. tilde; print_ident_like lbl] in
@@ -4890,6 +4896,7 @@ and print_argument ~state (arg_lbl, arg) cmt_tbl =
48904896 Pexp_constraint
48914897 ( ({pexp_desc = Pexp_ident {txt = Longident. Lident name}} as arg_expr),
48924898 typ );
4899+ pexp_attributes = [] ;
48934900 } )
48944901 when lbl = name && not (ParsetreeViewer. is_braced_expr arg_expr) ->
48954902 let loc = {l0 with loc_end = arg.pexp_loc.loc_end} in
@@ -4904,7 +4911,11 @@ and print_argument ~state (arg_lbl, arg) cmt_tbl =
49044911 in
49054912 print_comments doc cmt_tbl loc
49064913 (* ~a? (optional lbl punned)*)
4907- | Opt {txt = lbl; loc}, {pexp_desc = Pexp_ident {txt = Longident. Lident name}}
4914+ | ( Opt {txt = lbl; loc},
4915+ {
4916+ pexp_desc = Pexp_ident {txt = Longident. Lident name};
4917+ pexp_attributes = [] ;
4918+ } )
49084919 when lbl = name ->
49094920 let doc = Doc. concat [Doc. tilde; print_ident_like lbl; Doc. question] in
49104921 print_comments doc cmt_tbl loc
0 commit comments