some progress

This commit is contained in:
cqc
2024-02-14 16:15:49 -06:00
parent 0f1fd67e8a
commit e2a574d215
18 changed files with 1420 additions and 216 deletions

14
ocp_indent.ml Normal file
View 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 ""