some progress
This commit is contained in:
14
ocp_indent.ml
Normal file
14
ocp_indent.ml
Normal file
@ -0,0 +1,14 @@
|
||||
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 ""
|
||||
Reference in New Issue
Block a user