File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -360,6 +360,16 @@ module E = struct
360360 when name = v ->
361361 Some
362362 (Parsetree. JSXPropPunning (true , {txt = name; loc = name_loc}))
363+ | Asttypes.Noloc. Labelled name , exp ->
364+ Some
365+ (Parsetree. JSXPropValue
366+ ( {txt = name; loc = Location. none},
367+ false ,
368+ sub.expr sub exp ))
369+ | Asttypes.Noloc. Optional name , exp ->
370+ Some
371+ (Parsetree. JSXPropValue
372+ ({txt = name; loc = Location. none}, true , sub.expr sub exp))
363373 | _ -> None )
364374 in
365375 jsx_unary_element ~loc ~attrs tag_name props
Original file line number Diff line number Diff line change @@ -465,6 +465,12 @@ module E = struct
465465 else Asttypes.Noloc. Labelled name.txt
466466 in
467467 (label, ident)
468+ | JSXPropValue (name , is_optional , value ) ->
469+ let label =
470+ if is_optional then Asttypes.Noloc. Optional name.txt
471+ else Asttypes.Noloc. Labelled name.txt
472+ in
473+ (label, sub.expr sub value)
468474 | _ -> failwith " todo" )
469475 in
470476 let children_expr =
You can’t perform that action at this time.
0 commit comments