Ocamlformat_lib.ParamsSourceval parens_if :
Ocamlformat_stdlib.bool ->
Conf.t ->
?disambiguate:Ocamlformat_stdlib.bool ->
Fmt.t ->
Fmt.tWhether an or-pattern should be disambiguated.
val get_or_pattern_sep :
?cmts_before:Ocamlformat_stdlib.bool ->
?space:Ocamlformat_stdlib.bool ->
Conf.t ->
nested:Ocamlformat_stdlib.bool ->
Fmt.ttype cases = {leading_space : Fmt.t;bar : Fmt.t;box_all : Fmt.t -> Fmt.t;box_pattern_arrow : Fmt.t -> Fmt.t;break_before_arrow : Fmt.t;break_after_arrow : Fmt.t;open_paren_branch : Fmt.t;break_after_opening_paren : Fmt.t;expr_parens : Ocamlformat_stdlib.bool Ocamlformat_stdlib.option;expr_eol : Fmt.t Ocamlformat_stdlib.option;branch_expr : Extended_ast.expression Ast.xt;Expression on the RHS of the ->.
close_paren_branch : Fmt.t;}val get_cases :
Conf.t ->
ctx:Ast.t ->
first:Ocamlformat_stdlib.bool ->
last:Ocamlformat_stdlib.bool ->
cmts_before:Ocamlformat_stdlib.bool ->
xbch:Extended_ast.expression Ast.xt ->
casesval wrap_tuple :
Conf.t ->
parens:Ocamlformat_stdlib.bool ->
no_parens_if_break:Ocamlformat_stdlib.bool ->
Fmt.t Ocamlformat_stdlib.list ->
Fmt.tFormat a tuple given a list of items.
type if_then_else = {box_branch : Fmt.t -> Fmt.t;cond : Fmt.t;box_keyword_and_expr : Fmt.t -> Fmt.t;branch_pro : Fmt.t;wrap_parens : Fmt.t -> Fmt.t;box_expr : Ocamlformat_stdlib.bool Ocamlformat_stdlib.option;expr_pro : Fmt.t Ocamlformat_stdlib.option;expr_eol : Fmt.t Ocamlformat_stdlib.option;branch_expr : Extended_ast.expression Ast.xt;break_end_branch : Fmt.t;space_between_branches : Fmt.t;}val get_if_then_else :
Conf.t ->
first:Ocamlformat_stdlib.bool ->
last:Ocamlformat_stdlib.bool ->
parens_bch:Ocamlformat_stdlib.bool ->
parens_prev_bch:Ocamlformat_stdlib.bool ->
xcond:Extended_ast.expression Ast.xt Ocamlformat_stdlib.option ->
xbch:Extended_ast.expression Ast.xt ->
expr_loc:Ocamlformat_ocaml_common.Location.t ->
fmt_extension_suffix:Fmt.t Ocamlformat_stdlib.option ->
fmt_attributes:Fmt.t ->
fmt_cond:(Extended_ast.expression Ast.xt -> Fmt.t) ->
cmts_before_kw:Fmt.t ->
cmts_after_kw:Fmt.t Ocamlformat_stdlib.option ->
if_then_elseval match_indent :
?default:Ocamlformat_stdlib.int ->
Conf.t ->
parens:Ocamlformat_stdlib.bool ->
ctx:Ast.t ->
Ocamlformat_stdlib.intmatch_indent c ~ctx ~default returns the indentation used for the pattern-matching in context ctx, depending on the `match-indent-nested` option, or using the default indentation (0 if not provided) if the option does not apply.
comma_sep c returns the format string used to separate two elements with a comma, depending on the `break-separators` option.