File tree 5 files changed +6
-1
lines changed
5 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -603,6 +603,7 @@ and lambda_while =
603
603
604
604
and lambda_for =
605
605
{ for_id : Ident .t ;
606
+ for_loc : scoped_location ;
606
607
for_from : lambda ;
607
608
for_to : lambda ;
608
609
for_dir : direction_flag ;
Original file line number Diff line number Diff line change @@ -507,6 +507,7 @@ and lambda_while =
507
507
508
508
and lambda_for =
509
509
{ for_id : Ident .t ;
510
+ for_loc : scoped_location ;
510
511
for_from : lambda ;
511
512
for_to : lambda ;
512
513
for_dir : direction_flag ;
Original file line number Diff line number Diff line change @@ -868,7 +868,7 @@ let rec lam ppf = function
868
868
| Lwhile {wh_cond; wh_body} ->
869
869
fprintf ppf " @[<2>(while@ %a@ %a)@]"
870
870
lam wh_cond lam wh_body
871
- | Lfor {for_id; for_from; for_to; for_dir; for_body} ->
871
+ | Lfor {for_id; for_loc = _ ; for_from; for_to; for_dir; for_body} ->
872
872
fprintf ppf " @[<2>(for %a@ %a@ %s@ %a@ %a)@]"
873
873
Ident. print for_id lam for_from
874
874
(match for_dir with Upto -> " to" | Downto -> " downto" )
Original file line number Diff line number Diff line change @@ -456,6 +456,7 @@ let iterator ~transl_exp ~scopes ~loc
456
456
let stop = bound "stop" stop in
457
457
let mk_iterator body =
458
458
Lfor { for_id = ident
459
+ ; for_loc = loc
459
460
; for_from = start .var
460
461
; for_to = stop .var
461
462
; for_dir = direction
@@ -483,6 +484,7 @@ let iterator ~transl_exp ~scopes ~loc
483
484
(* for iter_ix = 0 to Array.length iter_arr - 1 ... *)
484
485
(* CR layouts v4 : will need updating when we allow non-values in arrays. * )
485
486
Lfor { for_id = iter_ix
487
+ ; for_loc = loc
486
488
; for_from = l0
487
489
; for_to = iter_len .var - l1
488
490
; for_dir = Upto
Original file line number Diff line number Diff line change @@ -691,6 +691,7 @@ and transl_exp0 ~in_new_scope ~scopes sort e =
691
691
let body = transl_exp ~scopes for_body_sort for_body in
692
692
Lfor {
693
693
for_id;
694
+ for_loc = of_location ~scopes e.exp_loc;
694
695
for_from = transl_exp ~scopes Jkind.Sort. for_predef_value for_from;
695
696
for_to = transl_exp ~scopes Jkind.Sort. for_predef_value for_to;
696
697
for_dir;
You can’t perform that action at this time.
0 commit comments