Module Pparse
Driver for the parser and external preprocessors.
Warning: this module is unstable and part of compiler-libs.
exception Error of Pparse.errortype 'a ast_kind = | Structure : Parsetree.structure Pparse.ast_kind| Signature : Parsetree.signature Pparse.ast_kind
val read_ast : 'a Pparse.ast_kind -> string -> 'aval write_ast : 'a Pparse.ast_kind -> string -> 'a -> unitval file :
tool_name:string ->
string ->
(Stdlib.Lexing.lexbuf -> 'a) ->
'a Pparse.ast_kind ->
'aval apply_rewriters :
?restore:bool ->
tool_name:string ->
'a Pparse.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 -> Pparse.error -> unitval parse_implementation :
tool_name:string ->
string ->
Parsetree.structure Pparse.ast_resultval parse_interface :
tool_name:string ->
string ->
Parsetree.signature Pparse.ast_resultval open_and_check_magic : string -> string -> Stdlib.in_channel * bool