package ocamlformat
Auto-formatter for OCaml code
Install
Dune Dependency
Authors
Maintainers
Sources
ocamlformat-0.27.0.tbz
sha256=ddbf484c076d08f99400ee84b790ec231f5c8fcbd5d3324a6400d5388e846d15
sha512=4d2a8965a7b7ad45f8f4e76c01cf38bfa68462b07dfa7bdb2db23bd3e3017b214e6780f036679fa8595dde4167a01d957e3af8837274320449014e306773f917
doc/api.html
API
OCamlformat's library API: Ocamlformat
. The entrypoint is the Ocamlformat.Translation_unit
module.
A basic usage would be:
let () =
let conf = Conf.default in
match
Translation_unit.parse_and_format Syntax.Use_file conf
~output_file:"output.ml" ~input_name:"input.ml"
~source:"let x = y"
with
| Ok formatted ->
print_endline formatted
| Error e ->
Translation_unit.Error.print Format.err_formatter
~debug:conf.opr_opts.debug ~quiet:conf.opr_opts.quiet e
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>