OCaml compiler library : Pprintast (original) (raw)

OCaml

Compiler API Version 5.3

< General Index

OCaml compiler library : Pprintast

Module Pprintast

module Pprintast: sig .. end

Pretty-printers for Parsetree

Warning: this module is unstable and part ofcompiler-libs.


type ``space_formatter = (unit, Format.formatter, unit) format

val longident : Format.formatter -> [Longident.t](Longident.html#TYPEt) -> unit

val constr : Format.formatter -> [Longident.t](Longident.html#TYPEt) -> unit

val expression : Format.formatter -> [Parsetree.expression](Parsetree.html#TYPEexpression) -> unit

val string_of_expression : [Parsetree.expression](Parsetree.html#TYPEexpression) -> string

val pattern : Format.formatter -> [Parsetree.pattern](Parsetree.html#TYPEpattern) -> unit

val core_type : Format.formatter -> [Parsetree.core_type](Parsetree.html#TYPEcore%5Ftype) -> unit

val signature : Format.formatter -> [Parsetree.signature](Parsetree.html#TYPEsignature) -> unit

val structure : Format.formatter -> [Parsetree.structure](Parsetree.html#TYPEstructure) -> unit

val string_of_structure : [Parsetree.structure](Parsetree.html#TYPEstructure) -> string

val module_expr : Format.formatter -> [Parsetree.module_expr](Parsetree.html#TYPEmodule%5Fexpr) -> unit

val toplevel_phrase : Format.formatter -> [Parsetree.toplevel_phrase](Parsetree.html#TYPEtoplevel%5Fphrase) -> unit

val top_phrase : Format.formatter -> [Parsetree.toplevel_phrase](Parsetree.html#TYPEtoplevel%5Fphrase) -> unit

val class_field : Format.formatter -> [Parsetree.class_field](Parsetree.html#TYPEclass%5Ffield) -> unit

val class_type_field : Format.formatter -> [Parsetree.class_type_field](Parsetree.html#TYPEclass%5Ftype%5Ffield) -> unit

val class_expr : Format.formatter -> [Parsetree.class_expr](Parsetree.html#TYPEclass%5Fexpr) -> unit

val class_type : Format.formatter -> [Parsetree.class_type](Parsetree.html#TYPEclass%5Ftype) -> unit

val module_type : Format.formatter -> [Parsetree.module_type](Parsetree.html#TYPEmodule%5Ftype) -> unit

val structure_item : Format.formatter -> [Parsetree.structure_item](Parsetree.html#TYPEstructure%5Fitem) -> unit

val signature_item : Format.formatter -> [Parsetree.signature_item](Parsetree.html#TYPEsignature%5Fitem) -> unit

val binding : Format.formatter -> [Parsetree.value_binding](Parsetree.html#TYPEvalue%5Fbinding) -> unit

val payload : Format.formatter -> [Parsetree.payload](Parsetree.html#TYPEpayload) -> unit

val tyvar_of_name : string -> string

Turn a type variable name into a valid identifier, taking care of the special treatment required for the single quote character in second position, or for keywords by escaping them with \#. No-op on "_".

val tyvar : Format.formatter -> string -> unit

Print a type variable name as a valid identifier, taking care of the special treatment required for the single quote character in second position, or for keywords by escaping them with \#. No-op on "_".

module Doc: sig .. end

Format_doc functions for error messages