Module Ast_iterator
module Ast_iterator: sig .. end
Ast_iterator.iterator enables AST inspection using open recursion. A typical mapper would be based on Ast_iterator.default_iterator, a trivial iterator, and will fall back on it for handling the syntax it does not modify.
Warning: this module is unstable and part of compiler-libs.
A generic Parsetree iterator
type iterator = {
} A iterator record implements one "method" per syntactic category, using an open recursion style: each method takes as its first argument the iterator to be applied to children in the syntax tree.
val default_iterator : iterator
A default iterator, which implements a "do not do anything" mapping.
© 1995-2026 INRIA.
https://ocaml.org/manual/5.5/api/compilerlibref/Ast_iterator.html