From 2a64471512ee7dcd6d6c65cd5a792344628616f0 Mon Sep 17 00:00:00 2001 From: Emilio Jesus Gallego Arias Date: Sun, 11 Feb 2018 19:42:14 +0100 Subject: [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! --- parsing/pcoq.mli | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'parsing/pcoq.mli') diff --git a/parsing/pcoq.mli b/parsing/pcoq.mli index f36250176..1b330aa04 100644 --- a/parsing/pcoq.mli +++ b/parsing/pcoq.mli @@ -78,7 +78,9 @@ module type S = val entry_create : string -> 'a entry val entry_parse : 'a entry -> coq_parsable -> 'a val entry_print : Format.formatter -> 'a entry -> unit - val with_parsable : coq_parsable -> ('a -> 'b) -> 'a -> 'b + + (* Get comment parsing information from the Lexer *) + val comment_state : coq_parsable -> ((int * int) * string) list (* Apparently not used *) val srules' : production_rule list -> symbol -- cgit v1.2.3