package ocamlformat
Module Ocamlformat.Translation_unitSource
Source
val parse_and_format :
Syntax.t ->
?output_file:Ocamlformat_stdlib.string ->
input_name:Ocamlformat_stdlib.string ->
source:Ocamlformat_stdlib.string ->
Conf.t ->
(Ocamlformat_stdlib.string, Error.t) Ocamlformat_stdlib.Result.tparse_and_format kind ?output_file ~input_name ~source conf opts parses and formats source as a list of fragments.
Source
val numeric :
Syntax.t ->
input_name:Ocamlformat_stdlib.string ->
source:Ocamlformat_stdlib.string ->
range:Range.t ->
Conf.t ->
Ocamlformat_stdlib.int Ocamlformat_stdlib.listnumeric ~input_name ~source ~range conf opts returns the indentation of the range of lines range (line numbers ranging from 1 to number of lines), where the line numbers are relative to source and the indentation is relative to the formatted output.