aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--parsing/cLexer.ml424
1 files changed, 1 insertions, 23 deletions
diff --git a/parsing/cLexer.ml4 b/parsing/cLexer.ml4
index a0cf631ea..d570f015e 100644
--- a/parsing/cLexer.ml4
+++ b/parsing/cLexer.ml4
@@ -408,24 +408,6 @@ let comment_stop ep =
comment_begin := None;
between_commands := false
-(* Does not unescape!!! *)
-let rec comm_string loc bp = parser
- | [< ''"' >] -> push_string "\""; loc
- | [< ''\\'; loc =
- (parser [< ' ('"' | '\\' as c) >] ->
- let () = match c with
- | '"' -> real_push_char c
- | _ -> ()
- in
- real_push_char c; loc
- | [< >] -> real_push_char '\\'; loc); s >]
- -> comm_string loc bp s
- | [< _ = Stream.empty >] ep ->
- let loc = set_loc_pos loc bp ep in
- err loc Unterminated_string
- | [< ''\n' as c; s >] ep -> real_push_char c; comm_string (bump_loc_line loc ep) bp s
- | [< 'c; s >] -> real_push_char c; comm_string loc bp s
-
let rec comment loc bp = parser bp2
| [< ''(';
loc = (parser
@@ -437,11 +419,7 @@ let rec comment loc bp = parser bp2
| [< '')' >] -> push_string "*)"; loc
| [< s >] -> real_push_char '*'; comment loc bp s >] -> loc
| [< ''"'; s >] ->
- let loc =
- (* In beautify mode, the lexing differs between strings in comments and
- regular strings (e.g. escaping). It seems wrong. *)
- if !Flags.beautify then (push_string"\""; comm_string loc bp2 s)
- else fst (string loc ~comm_level:(Some 0) bp2 0 s)
+ let loc = fst (string loc ~comm_level:(Some 0) bp2 0 s)
in
comment loc bp s
| [< _ = Stream.empty >] ep ->