aboutsummaryrefslogtreecommitdiffhomepage
path: root/parsing/cLexer.ml4
diff options
context:
space:
mode:
authorGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2016-10-12 16:58:04 +0200
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2016-10-17 20:14:13 +0200
commitb51eac830d2be726db06ae6d2539a81b41e90677 (patch)
tree1d21dfe78e4795c8ceb2eddadd98876798b37abd /parsing/cLexer.ml4
parent35961a4ff5a5b8c9b9786cbab0abd279263eb655 (diff)
[toplevel] Remove duplicate beautify flags.
Given the current style in flags.mli no reason to have a function. A deeper question is why a global flag is needed, in particular the use in `interp/constrextern.ml` seems strange, the condition in the lexer should be looked at and I'm not sure about `printing/`.
Diffstat (limited to 'parsing/cLexer.ml4')
-rw-r--r--parsing/cLexer.ml44
1 files changed, 2 insertions, 2 deletions
diff --git a/parsing/cLexer.ml4 b/parsing/cLexer.ml4
index cfee77ab2..e59b9630f 100644
--- a/parsing/cLexer.ml4
+++ b/parsing/cLexer.ml4
@@ -390,7 +390,7 @@ let comment_stop ep =
if !Flags.xml_export && Buffer.length current_comment > 0 &&
(!between_commands || not(null_comment current_s)) then
Hook.get f_xml_output_comment current_s;
- (if Flags.do_beautify() && Buffer.length current_comment > 0 &&
+ (if !Flags.beautify && Buffer.length current_comment > 0 &&
(!between_commands || not(null_comment current_s)) then
let bp = match !comment_begin with
Some bp -> bp
@@ -437,7 +437,7 @@ let rec comment loc bp = parser bp2
let loc =
(* In beautify mode, the lexing differs between strings in comments and
regular strings (e.g. escaping). It seems wrong. *)
- if Flags.do_beautify() then (push_string"\""; comm_string loc bp2 s)
+ if !Flags.beautify then (push_string"\""; comm_string loc bp2 s)
else fst (string loc ~comm_level:(Some 0) bp2 0 s)
in
comment loc bp s