package ocp-indent
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=70db6649a8c08a682ad63730c9752e31
sha512=565353de333dd44375366fff75e85a6256c3cd9ff52b3db79803141f975e77cda04dfe32f5e0f2d4c82c59be8f04e9c2bf4d066b113b2cdf267f4c3dcfa401da
doc/ocp-indent.lib/IndentPrinter/index.html
Module IndentPrinterSource
Passed to the function specified with the Extended output_kind
type 'a output_kind = | Numeric of int -> 'a -> 'a| Print of string -> 'a -> 'a| Extended of IndentBlock.t -> output_elt -> 'a -> 'a
* If Print f, the whole input is fed as strings through f, with expected lines reindented (with spaces). * If Numeric f, the indentation values (i.e. total number of leading spaces) for each lines on which in_lines is true are passed through the function. * If Extended f, every element is fed to f with arguments state element. There is at least an element for each token, but there may be more (whitespace, multiline tokens...). You may safely raise an exception from f to stop further processing. This version can be used for syntax highlighting or storing checkpoints.
type 'a output = {debug : bool;config : IndentConfig.t;(*Returns true on the lines that should be reindented (lines start at 1)
*)in_lines : int -> bool;(*if true, partial indent will adapt to the current indent of the file
*)adaptive : bool;indent_empty : bool;kind : 'a output_kind;
}