Files
oplevel/ocp_indent.ml
2024-02-14 16:15:49 -06:00

15 lines
381 B
OCaml

let _ = Approx_lexer.enable_extension "lwt"
let indent s in_lines =
let output =
{ IndentPrinter.debug = false
; config = IndentConfig.default
; in_lines
; indent_empty = true
; adaptive = true
; kind = IndentPrinter.Print (fun s acc -> acc ^ s)
}
in
let stream = Nstream.of_string s in
IndentPrinter.proceed output stream IndentBlock.empty ""