@@ -996,60 +996,13 @@ and expression_desc cxt ~(level : int) f x : cxt =
996
996
P. string f " ..." ;
997
997
expression ~level: 13 cxt f e)
998
998
999
- (*
1000
- (* match jsx_element with
1001
- | Parsetree.Jsx_fragment {jsx_fragment_children = children} ->
1002
- P.string f "<>";
1003
- (let children =
1004
- fields
1005
- |> List.find_map (fun (n, e) ->
1006
- if n = "children" then Some e else None)
1007
- in
1008
- children
1009
- |> Option.iter (fun c ->
1010
- P.string f "{";
1011
- let _ = expression ~level:1 cxt f c in
1012
- P.string f "}"));
1013
- P.string f "</>";
1014
- cxt
1015
- | Parsetree.Jsx_unary_element
1016
- {jsx_unary_element_tag_name = {txt = Longident.Lident tagName}} ->
1017
- Printf.eprintf "Crazy Tag: %s\n" tagName;
1018
- P.string f (Format.sprintf "<%s />" tagName);
1019
- cxt
1020
- | Parsetree.Jsx_container_element
1021
- {
1022
- jsx_container_element_tag_name_start =
1023
- {txt = Longident.Lident tagName};
1024
- } ->
1025
- P.string f (Format.sprintf "<%s" tagName);
1026
- List.iter
1027
- (fun (n, x) ->
1028
- P.space f;
1029
- P.string f n;
1030
- P.string f "=";
1031
- P.string f "{";
1032
- let _ = expression ~level:0 cxt f x in
1033
- P.string f "}")
1034
- fields;
1035
- P.string f "></";
1036
- P.string f tagName;
1037
- P.string f ">";
1038
- cxt *)
1039
- | _ ->
1040
- expression_desc cxt ~level f
1041
- (Call
1042
- ( e,
1043
- el,
1044
- {call_transformed_jsx = None; arity = Full; call_info = Call_ml}
1045
- )))
1046
- *)
1047
-
1048
999
and print_jsx cxt ~(level : int ) f (tag : J.expression )
1049
1000
(fields : (string * J.expression) list ) : cxt =
1050
1001
let print_tag () =
1051
1002
match tag.expression_desc with
1052
1003
| J. Str {txt} -> P. string f txt
1004
+ (* fragment *)
1005
+ | J. Var (J. Qualified ({id = {name = "JsxRuntime" } } , Some "Fragment" )) -> ()
1053
1006
| _ ->
1054
1007
let _ = expression ~level cxt f tag in
1055
1008
()
0 commit comments