Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
type commentWithCategory =
(String.t * commentCategory * Ast_404.Location.t) list
val print_easy : Easy_format.t -> string
val case_not_implemented :
string ->
Ast_404.Location.t ->
(string * int * int) ->
unit
val exprDescrString : Ast_404.Parsetree.expression -> string
and ruleCategory =
| FunctionApplication of layoutNode list
| SpecificInfixPrecedence of ruleInfoData * layoutNode
| PotentiallyLowPrecedence of layoutNode
| Simple of layoutNode
and easyFormatLabelFormatter = Easy_format.t -> Easy_format.t -> Easy_format.t
and listConfig = {
newlinesAboveItems : int;
newlinesAboveComments : int;
newlinesAboveDocComments : int;
interleaveComments : bool;
renderFinalSep : bool;
break : whenToDoSomething;
wrap : string * string;
inline : bool * bool;
sep : string;
indent : int;
sepLeft : bool;
preSpace : bool;
postSpace : bool;
pad : bool * bool;
listConfigIfCommentsInterleaved : (listConfig -> listConfig) option;
listConfigIfEolCommentsInterleaved : (listConfig -> listConfig) option;
}
and layoutNode =
| SourceMap of Ast_404.Location.t * layoutNode
| WithEOLComment of string * layoutNode
| Sequence of listConfig * layoutNode list
| Label of easyFormatLabelFormatter * layoutNode * layoutNode
| Easy of Easy_format.t
* These represent "intent to format" the AST, with some parts being annotated * with original source location. The benefit of tracking this in an * intermediate structure, is that we can then interleave comments throughout * the tree before generating the final representation. That prevents the * formatting code from having to thread comments everywhere. * * The final representation is rendered using Easy_format.
val print_comment_type : commentCategory -> string
val print_comments :
(string * commentCategory * Ast_404.Location.t) list ->
unit
val print_easy_rec : ?indent:int -> Easy_format.t -> unit
val print_layout : ?indent:int -> layoutNode -> unit
val longIdentSame : (Ast_404.Longident.t * Ast_404.Longident.t) -> bool
val same_ast_modulo_varification_and_extensions :
Ast_404.Parsetree.core_type ->
Ast_404.Parsetree.core_type ->
bool
val wrapLayoutWithLoc : Ast_404.Location.t option -> layoutNode -> layoutNode
val expandLocation :
Ast_404.Location.t ->
expand:(int * int) ->
Ast_404.Location.t
type attributesPartition = {
arityAttrs : Ast_404.Parsetree.attributes;
docAttrs : Ast_404.Parsetree.attributes;
stdAttrs : Ast_404.Parsetree.attributes;
jsxAttrs : Ast_404.Parsetree.attributes;
}
Kinds of attributes
val partitionAttributes :
Ast_404.Parsetree.attribute list ->
attributesPartition
Partition attributes into kinds
val extractStdAttrs :
Ast_404.Parsetree.attribute list ->
Ast_404.Parsetree.attributes
val sequentialIfBlocks :
Ast_404.Parsetree.expression option ->
(Ast_404.Parsetree.expression * Ast_404.Parsetree.expression) list
* Ast_404.Parsetree.expression option
val printedStringAndFixity : string -> tokenFixity
val rules : (precedenceEntryType * (string -> associativity * bool)) list list
val indexOfFirstMatch :
prec:precedence ->
(precedenceEntryType * (string -> 'a * bool)) list list ->
('a * int) option
val precedenceInfo : prec:precedence -> (associativity * int) option
val isLeftAssociative : prec:precedence -> bool
val isRightAssociative : prec:precedence -> bool
val higherPrecedenceThan : precedence -> precedence -> bool
val printedStringAndFixityExpr : Ast_404.Parsetree.expression -> tokenFixity
val is_predef_option : Ast_404.Longident.t -> bool
val protect_ident : Format.formatter -> string -> unit
val protect_longident :
Format.formatter ->
(Format.formatter -> 'a -> unit) ->
'a ->
string ->
unit
val longident : Format.formatter -> Ast_404.Longident.t -> unit
val orList : Ast_404.Parsetree.pattern -> Ast_404.Parsetree.pattern list
type space_formatter = (unit, Format.formatter, unit) Pervasives.format
val override : Ast_404.Asttypes.override_flag -> string
val type_variance : Ast_404.Asttypes.variance -> string
type construct = [
|
`cons of Ast_404.Parsetree.expression list
|
`list of Ast_404.Parsetree.expression list
|
`nil
|
`normal
|
`simple of Ast_404.Longident.t
|
`tuple
]
val view_expr :
Ast_404.Parsetree.expression ->
[> `cons of Ast_404.Parsetree.expression list
| `list of Ast_404.Parsetree.expression list
| `nil
| `normal
| `simple of Ast_404.Longident.t
| `tuple ]
val is_simple_construct : construct -> bool
val pp :
Format.formatter ->
('a, Format.formatter, unit) Pervasives.format ->
'a
val detectTernary :
Ast_404.Parsetree.case list ->
(Ast_404.Parsetree.expression * Ast_404.Parsetree.expression) option
type formatSettings = {
constructorTupleImplicitArity : bool;
space : int;
returnStyle : funcReturnStyle;
listsRecordsIndent : int;
indentWrappedPatternArgs : int;
indentMatchCases : int;
indentAfterLabels : int;
trySwitchIndent : int;
funcApplicationLabelStyle : funcApplicationLabelStyle;
funcCurriedPatternStyle : funcApplicationLabelStyle;
width : int;
assumeExplicitArity : bool;
constructorLists : string list;
}
val configuredSettings : formatSettings Pervasives.ref
val string_of_formatter : (Format.formatter -> 'a -> unit) -> 'a -> string
val createFormatter :
unit ->
< case_list : Format.formatter -> Ast_404.Parsetree.case list -> unit
; core_type : Format.formatter -> Ast_404.Parsetree.core_type -> unit
; expression : Format.formatter -> Ast_404.Parsetree.expression -> unit
; pattern : Format.formatter -> Ast_404.Parsetree.pattern -> unit
; signature :
commentWithCategory ->
Format.formatter ->
Ast_404.Parsetree.signature ->
unit
; structure :
commentWithCategory ->
Format.formatter ->
Ast_404.Parsetree.structure ->
unit
; toplevel_phrase :
Format.formatter ->
Ast_404.Parsetree.toplevel_phrase ->
unit >
val defaultSettings : formatSettings