@@ -353,7 +353,6 @@ module Template = struct
353353 partial : bool ;
354354 transformed_jsx : bool ;
355355 }
356- | Match of {expr : Parsetree .expression ; cases : Parsetree .case list }
357356
358357 let attach attrs e =
359358 MapperUtils.ApplyTransforms. attach_to_replacement ~attrs e
@@ -370,8 +369,6 @@ module Template = struct
370369 | _ -> args
371370 in
372371 Some (Apply {funct; args = args'; partial; transformed_jsx})
373- | {Parsetree. pexp_desc = Pexp_match (expr , cases )} ->
374- Some (Match {expr; cases})
375372 | _ -> None
376373
377374 let of_expr_with_attrs (e : Parsetree.expression ) :
@@ -387,16 +384,6 @@ module Template = struct
387384 let apply_direct ~mapper ~template ~template_attrs ~call_args
388385 (exp : Parsetree.expression ) =
389386 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
400387 | Apply
401388 {funct = template_funct; args = template_args; partial; transformed_jsx}
402389 ->
@@ -412,16 +399,6 @@ module Template = struct
412399 let apply_piped ~mapper ~template ~template_attrs ~lhs ~pipe_args ~funct
413400 (exp : Parsetree.expression ) =
414401 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
425402 | Apply
426403 {funct = template_funct; args = template_args; partial; transformed_jsx}
427404 ->
@@ -439,8 +416,6 @@ module Template = struct
439416 let apply_piped_maybe_empty ~mapper ~template ~template_attrs ~lhs ~pipe_args
440417 ~funct (exp : Parsetree.expression ) =
441418 match template with
442- | Match _ ->
443- apply_piped ~mapper ~template ~template_attrs ~lhs ~pipe_args ~funct exp
444419 | Apply
445420 {funct = template_funct; args = template_args; partial; transformed_jsx}
446421 ->
@@ -470,15 +445,6 @@ module Template = struct
470445 let apply_single_pipe_collapse ~mapper ~template ~template_attrs ~lhs_exp
471446 ~pipe_args (exp : Parsetree.expression ) =
472447 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
482448 | Apply
483449 {
484450 funct = templ_f;
0 commit comments