aboutsummaryrefslogtreecommitdiffhomepage
path: root/parsing/cLexer.ml4
diff options
context:
space:
mode:
authorGravatar Gaetan Gilbert <gaetan.gilbert@ens-lyon.fr>2017-04-21 19:36:45 +0200
committerGravatar Gaetan Gilbert <gaetan.gilbert@ens-lyon.fr>2017-04-27 21:33:39 +0200
commit2826683746569b9d78aa01e319315ab554e1619b (patch)
treeda0933c7169635d9e35003af4d40b0408e7de96d /parsing/cLexer.ml4
parent8a3cd2fe699540f1ae5a56917d0f6b951f81d731 (diff)
Fix omitted labels in function calls
Diffstat (limited to 'parsing/cLexer.ml4')
-rw-r--r--parsing/cLexer.ml418
1 files changed, 9 insertions, 9 deletions
diff --git a/parsing/cLexer.ml4 b/parsing/cLexer.ml4
index 6d259e1b1..f25b394f0 100644
--- a/parsing/cLexer.ml4
+++ b/parsing/cLexer.ml4
@@ -345,13 +345,13 @@ let rec string loc ~comm_level bp len = parser
if esc then string loc ~comm_level bp (store len '"') s else (loc, len)
| [< ''('; s >] ->
(parser
- | [< ''*'; s >] ->
- string loc
- (Option.map succ comm_level)
+ | [< ''*'; s >] ->
+ let comm_level = Option.map succ comm_level in
+ string loc ~comm_level
bp (store (store len '(') '*')
s
| [< >] ->
- string loc comm_level bp (store len '(') s) s
+ string loc ~comm_level bp (store len '(') s) s
| [< ''*'; s >] ->
(parser
| [< '')'; s >] ->
@@ -361,9 +361,9 @@ let rec string loc ~comm_level bp len = parser
| _ -> ()
in
let comm_level = Option.map pred comm_level in
- string loc comm_level bp (store (store len '*') ')') s
+ string loc ~comm_level bp (store (store len '*') ')') s
| [< >] ->
- string loc comm_level bp (store len '*') s) s
+ string loc ~comm_level bp (store len '*') s) s
| [< ''\n' as c; s >] ep ->
(* If we are parsing a comment, the string if not part of a token so we
update the first line of the location. Otherwise, we update the last
@@ -372,8 +372,8 @@ let rec string loc ~comm_level bp len = parser
if Option.has_some comm_level then bump_loc_line loc ep
else bump_loc_line_last loc ep
in
- string loc comm_level bp (store len c) s
- | [< 'c; s >] -> string loc comm_level bp (store len c) s
+ string loc ~comm_level bp (store len c) s
+ | [< 'c; s >] -> string loc ~comm_level bp (store len c) s
| [< _ = Stream.empty >] ep ->
let loc = set_loc_pos loc bp ep in
err loc Unterminated_string
@@ -613,7 +613,7 @@ let rec next_token loc = parser bp
| [< ' ('0'..'9' as c); len = number (store 0 c) >] ep ->
comment_stop bp;
(INT (get_buff len), set_loc_pos loc bp ep)
- | [< ''\"'; (loc,len) = string loc None bp 0 >] ep ->
+ | [< ''\"'; (loc,len) = string loc ~comm_level:None bp 0 >] ep ->
comment_stop bp;
(STRING (get_buff len), set_loc_pos loc bp ep)
| [< ' ('(' as c);