Skip to content

Commit

Permalink
use helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
PizieDust committed Jun 27, 2024
1 parent 78c93e8 commit 831befe
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/analysis/ppx_expand.ml
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,7 @@ let get_ppxed_source ~ppxed_parsetree ~pos ppx_kind_with_attr :
let expr (self : Ast_iterator.iterator)
(new_expr : Parsetree.expression) =
match
original_expr.pexp_loc.loc_start.pos_cnum
<= new_expr.pexp_loc.loc_start.pos_cnum
&& new_expr.pexp_loc.loc_end.pos_cnum
<= original_expr.pexp_loc.loc_end.pos_cnum
Location_aux.included ~into:(original_expr.pexp_loc) new_expr.pexp_loc
with
| true -> expression := new_expr :: !expression
| false -> Ast_iterator.default_iterator.expr self new_expr
Expand Down

0 comments on commit 831befe

Please sign in to comment.