diff options
Diffstat (limited to 'parsing/lexer.ml4')
-rw-r--r-- | parsing/lexer.ml4 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/parsing/lexer.ml4 b/parsing/lexer.ml4 index 26377013f..5984f7415 100644 --- a/parsing/lexer.ml4 +++ b/parsing/lexer.ml4 @@ -237,7 +237,7 @@ let rec string bp len = parser let xml_output_comment = ref (fun _ -> ()) let set_xml_output_comment f = xml_output_comment := f -(* Utilities for comment translation *) +(* Utilities for comments in beautify *) let comment_begin = ref None let comm_loc bp = if !comment_begin=None then comment_begin := Some bp @@ -280,7 +280,7 @@ let comment_stop ep = if !Flags.xml_export && Buffer.length current > 0 && (!between_com || not(null_comment current_s)) then !xml_output_comment current_s; - (if Flags.do_translate() && Buffer.length current > 0 && + (if Flags.do_beautify() && Buffer.length current > 0 && (!between_com || not(null_comment current_s)) then let bp = match !comment_begin with Some bp -> bp @@ -315,7 +315,7 @@ let rec comment bp = parser bp2 | [< '')' >] -> push_string "*)"; | [< s >] -> real_push_char '*'; comment bp s >] -> () | [< ''"'; s >] -> - if Flags.do_translate() then (push_string"\"";comm_string bp2 s) + if Flags.do_beautify() then (push_string"\"";comm_string bp2 s) else ignore (string bp2 0 s); comment bp s | [< _ = Stream.empty >] ep -> err (bp, ep) Unterminated_comment @@ -405,7 +405,7 @@ let rec next_token = parser bp (("METAIDENT", get_buff len), (bp,ep)) | [< ''.' as c; t = parse_after_dot bp c >] ep -> comment_stop bp; - if Flags.do_translate() & t=("",".") then between_com := true; + if Flags.do_beautify() & t=("",".") then between_com := true; (t, (bp,ep)) | [< ''?'; s >] ep -> let t = parse_after_qmark bp s in comment_stop bp; (t, (ep, bp)) |