aboutsummaryrefslogtreecommitdiffhomepage
path: root/parsing
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2016-11-20 15:54:55 +0100
committerGravatar Maxime Dénès <mail@maximedenes.fr>2016-12-02 17:29:00 +0100
commit7e8434765ca1289aeb3a5200e791c9ced0acfde4 (patch)
tree7a6f7bc44921512ad65fb9ae9398a5b023fd8281 /parsing
parentafab44873b7861d542cc0146d2bb8099d513f008 (diff)
Fixing lexing of strings in comments for beautifier.
Was a bug introduced in 0ad6edc1.
Diffstat (limited to 'parsing')
-rw-r--r--parsing/cLexer.ml44
1 files changed, 2 insertions, 2 deletions
diff --git a/parsing/cLexer.ml4 b/parsing/cLexer.ml4
index d570f015e..aec6a3264 100644
--- a/parsing/cLexer.ml4
+++ b/parsing/cLexer.ml4
@@ -419,8 +419,8 @@ let rec comment loc bp = parser bp2
| [< '')' >] -> push_string "*)"; loc
| [< s >] -> real_push_char '*'; comment loc bp s >] -> loc
| [< ''"'; s >] ->
- let loc = fst (string loc ~comm_level:(Some 0) bp2 0 s)
- in
+ let loc, len = string loc ~comm_level:(Some 0) bp2 0 s in
+ push_string "\""; push_string (get_buff len); push_string "\"";
comment loc bp s
| [< _ = Stream.empty >] ep ->
let loc = set_loc_pos loc bp ep in