File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,8 @@ module IfThenElse = struct
53
53
| Pexp_record (_ , Some _ ) -> None
54
54
| _ -> None
55
55
56
- let mkMapper ~pos ~changed =
57
- let expr (mapper : Ast_mapper.mapper ) (e : Parsetree.expression ) =
56
+ let mkIterator ~pos ~changed =
57
+ let expr (iterator : Ast_iterator.iterator ) (e : Parsetree.expression ) =
58
58
let newExp =
59
59
match e.pexp_desc with
60
60
| Pexp_ifthenelse
@@ -95,18 +95,16 @@ module IfThenElse = struct
95
95
| _ -> None
96
96
in
97
97
match newExp with
98
- | Some newExp ->
99
- changed := Some newExp;
100
- newExp
101
- | None -> Ast_mapper. default_mapper.expr mapper e
98
+ | Some newExp -> changed := Some newExp
99
+ | None -> Ast_iterator. default_iterator.expr iterator e
102
100
in
103
101
104
- {Ast_mapper. default_mapper with expr}
102
+ {Ast_iterator. default_iterator with expr}
105
103
106
104
let xform ~pos structure =
107
105
let changed = ref None in
108
- let mapper = mkMapper ~pos ~changed in
109
- let _ = mapper .structure mapper structure in
106
+ let iterator = mkIterator ~pos ~changed in
107
+ iterator .structure iterator structure;
110
108
! changed
111
109
end
112
110
You can’t perform that action at this time.
0 commit comments