A generic Parsetree mapper
type mapper = {}A mapper record implements one "method" per syntactic category, using an open recursion style: each method takes as its first argument the mapper to be applied to children in the syntax tree.
val default_mapper : mapperA default mapper, which implements a "deep identity" mapping.
Convenience functions to write mappers
val map_opt : ('a -> 'b) -> 'a option -> 'b optionval extension_of_error : Location.error -> Parsetree.extensionEncode an error into an 'ocaml.error' extension node which can be inserted in a generated Parsetree. The compiler will be responsible for reporting the error.
val attribute_of_warning : Location.t -> string -> Parsetree.attributeEncode a warning message into an 'ocaml.ppwarning' attribute which can be inserted in a generated Parsetree. The compiler will be responsible for reporting the warning.
type nonrec location_error = Location.error
val error_of_exn : exn -> location_error optionval register_error_of_exn : (exn -> location_error option) -> unitval report_exception : Stdlib.Format.formatter -> exn -> unitval get_error_message : location_error -> stringval set_error_message : location_error -> string -> location_errorval make_error_of_message : loc:Location.t -> string -> sub:(Location.t * string) list -> location_errorval print_error : Stdlib.Format.formatter -> location_error -> unitval raise_error : location_error -> 'a