Module Pparse
Driver for the parser, external preprocessors and ast plugin hooks
Warning: this module is unstable and part of compiler-libs.
exceptionError of error
type 'a ast_kind=|Structure : Parsetree.structure ast_kind|Signature : Parsetree.signature ast_kind
val read_ast : 'a ast_kind -> string -> 'aval write_ast : 'a ast_kind -> string -> 'a -> unitval file : tool_name:string -> string -> (Stdlib.Lexing.lexbuf -> 'a) -> 'a ast_kind -> 'aval apply_rewriters : ?restore:bool -> tool_name:string -> 'a ast_kind -> 'a -> 'aIf
restore = true(the default), cookies set by external rewriters will be kept for later calls.
val apply_rewriters_str : ?restore:bool -> tool_name:string -> Parsetree.structure -> Parsetree.structureval apply_rewriters_sig : ?restore:bool -> tool_name:string -> Parsetree.signature -> Parsetree.signatureval report_error : Stdlib.Format.formatter -> error -> unitval parse_implementation : tool_name:string -> string -> Parsetree.structureval parse_interface : tool_name:string -> string -> Parsetree.signatureval call_external_preprocessor : string -> string -> stringval open_and_check_magic : string -> string -> Stdlib.in_channel * bool
module ImplementationHooks : Misc.HookSig with type t = Parsetree.structuremodule InterfaceHooks : Misc.HookSig with type t = Parsetree.signature