diff options
author | Emilio Jesus Gallego Arias <e+git@x80.org> | 2018-02-11 19:42:14 +0100 |
---|---|---|
committer | Emilio Jesus Gallego Arias <e+git@x80.org> | 2018-02-28 18:16:22 +0100 |
commit | 2a64471512ee7dcd6d6c65cd5a792344628616f0 (patch) | |
tree | 9c98439db32ece160fd08304bfc4f1b5a63584e2 /printing/pputils.mli | |
parent | 893f8a3a3c573ab6b11cc3938cc67ccdc1b6b4ea (diff) |
[toplevel] Move beautify to its own pass.
We first load the file, then we print it as a post-processing
step. This is both more flexible and clearer.
We also refactor the comments handling to minimize the logic that is
living in the Lexer. Indeed, the main API is now living in the
printer, and complex interactions with the state are not possible
anymore, including the removal of messing with low-level summary and
state setting!
Diffstat (limited to 'printing/pputils.mli')
-rw-r--r-- | printing/pputils.mli | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/printing/pputils.mli b/printing/pputils.mli index ec5c32fc4..483bd0ae3 100644 --- a/printing/pputils.mli +++ b/printing/pputils.mli @@ -37,3 +37,9 @@ val pr_red_expr_env : Environ.env -> Evd.evar_map -> val pr_raw_generic : Environ.env -> rlevel generic_argument -> Pp.t val pr_glb_generic : Environ.env -> glevel generic_argument -> Pp.t + +(* The comments interface is imperative due to the printer not + threading it, this could be solved using a better data + structure. *) +val beautify_comments : ((int * int) * string) list ref +val extract_comments : int -> string list |