- | Iteration (For ((e1opt,i1), (e2opt,i2), (e3opt,i3), st)) ->
- let e1opt' = statf (ExprStatement (e1opt),i1) in
- let e2opt' = statf (ExprStatement (e2opt),i2) in
- let e3opt' = statf (ExprStatement (e3opt),i3) in
- (match (e1opt', e2opt', e3opt') with
- | ((ExprStatement x1,i1), (ExprStatement x2,i2), ((ExprStatement x3,i3))) ->
- Iteration (For ((x1,i1), (x2,i2), (x3,i3), statf st))
+ | Iteration (For ((e1opt,i1), (e2opt,i2), (e3opt,i3), st)) ->
+ let e1opt' = statf (mk_st (ExprStatement (e1opt)) i1) in
+ let e2opt' = statf (mk_st (ExprStatement (e2opt)) i2) in
+ let e3opt' = statf (mk_st (ExprStatement (e3opt)) i3) in
+
+ let e1' = Ast_c.unwrap_st e1opt' in
+ let e2' = Ast_c.unwrap_st e2opt' in
+ let e3' = Ast_c.unwrap_st e3opt' in
+ let i1' = Ast_c.get_ii_st_take_care e1opt' in
+ let i2' = Ast_c.get_ii_st_take_care e2opt' in
+ let i3' = Ast_c.get_ii_st_take_care e3opt' in
+
+ (match (e1', e2', e3') with
+ | ((ExprStatement x1), (ExprStatement x2), ((ExprStatement x3))) ->
+ Iteration (For ((x1,i1'), (x2,i2'), (x3,i3'), statf st))
+