aboutsummaryrefslogtreecommitdiff
path: root/parsing
diff options
context:
space:
mode:
authorMaxime Dénès2016-12-02 17:29:15 +0100
committerMaxime Dénès2016-12-02 17:29:15 +0100
commite83ffcd53acdebfbbd927b3c9b48a0d1ad6ca9e5 (patch)
tree26a9b934f0bf1f9dc4d1209cf613d60ad4a82b7b /parsing
parentfa1e627e12831417694b4fb538154721111741b5 (diff)
parent7e8434765ca1289aeb3a5200e791c9ced0acfde4 (diff)
Merge branch 'pr/367' into v8.6
Parts of PR#367: Fixing the "beautifier" and checking the parsing-printing reversibility
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 d570f015eb..aec6a32644 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