@@ -353,7 +353,6 @@ module Template = struct
353
353
partial : bool ;
354
354
transformed_jsx : bool ;
355
355
}
356
- | Match of {expr : Parsetree .expression ; cases : Parsetree .case list }
357
356
358
357
let attach attrs e =
359
358
MapperUtils.ApplyTransforms. attach_to_replacement ~attrs e
@@ -370,8 +369,6 @@ module Template = struct
370
369
| _ -> args
371
370
in
372
371
Some (Apply {funct; args = args'; partial; transformed_jsx})
373
- | {Parsetree. pexp_desc = Pexp_match (expr , cases )} ->
374
- Some (Match {expr; cases})
375
372
| _ -> None
376
373
377
374
let of_expr_with_attrs (e : Parsetree.expression ) :
@@ -387,16 +384,6 @@ module Template = struct
387
384
let apply_direct ~mapper ~template ~template_attrs ~call_args
388
385
(exp : Parsetree.expression ) =
389
386
match template with
390
- | Match {expr; cases} ->
391
- let res =
392
- {
393
- exp with
394
- pexp_desc =
395
- Pexp_match
396
- (MapperUtils. replace_placeholders_in_expr expr call_args, cases);
397
- }
398
- in
399
- attach template_attrs res
400
387
| Apply
401
388
{funct = template_funct; args = template_args; partial; transformed_jsx}
402
389
->
@@ -412,16 +399,6 @@ module Template = struct
412
399
let apply_piped ~mapper ~template ~template_attrs ~lhs ~pipe_args ~funct
413
400
(exp : Parsetree.expression ) =
414
401
match template with
415
- | Match {expr; cases} ->
416
- let res =
417
- {
418
- exp with
419
- pexp_desc =
420
- Pexp_match
421
- (MapperUtils. replace_placeholders_in_expr expr [lhs], cases);
422
- }
423
- in
424
- attach template_attrs res
425
402
| Apply
426
403
{funct = template_funct; args = template_args; partial; transformed_jsx}
427
404
->
@@ -439,8 +416,6 @@ module Template = struct
439
416
let apply_piped_maybe_empty ~mapper ~template ~template_attrs ~lhs ~pipe_args
440
417
~funct (exp : Parsetree.expression ) =
441
418
match template with
442
- | Match _ ->
443
- apply_piped ~mapper ~template ~template_attrs ~lhs ~pipe_args ~funct exp
444
419
| Apply
445
420
{funct = template_funct; args = template_args; partial; transformed_jsx}
446
421
->
@@ -470,15 +445,6 @@ module Template = struct
470
445
let apply_single_pipe_collapse ~mapper ~template ~template_attrs ~lhs_exp
471
446
~pipe_args (exp : Parsetree.expression ) =
472
447
match template with
473
- | Match {expr; cases} ->
474
- let res =
475
- Ast_helper.Exp. match_
476
- (MapperUtils. replace_placeholders_in_expr expr
477
- ((Asttypes. Nolabel , lhs_exp)
478
- :: ArgUtils. map_expr_args mapper pipe_args))
479
- cases
480
- in
481
- attach template_attrs res
482
448
| Apply
483
449
{
484
450
funct = templ_f;
0 commit comments