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/cLexer.mli | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'parsing/cLexer.mli') diff --git a/parsing/cLexer.mli b/parsing/cLexer.mli index 5f4e10f14..2d35571f1 100644 --- a/parsing/cLexer.mli +++ b/parsing/cLexer.mli @@ -55,7 +55,4 @@ val get_lexer_state : unit -> lexer_state val release_lexer_state : unit -> lexer_state [@@ocaml.deprecated "Use get_lexer_state"] val drop_lexer_state : unit -> unit - -(* Retrieve the comments lexed at a given location of the stream - currently being processeed *) -val extract_comments : int -> string list +val get_comment_state : lexer_state -> ((int * int) * string) list -- cgit v1.2.3