Skip to content

Commit a3f52d4

Browse files
Michael Schmidtxavierleroy
authored andcommitted
bug 39251, singleline_comment consumes a newline => lexing must continue with initial_linebegin
1 parent 33a1d81 commit a3f52d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cparser/Lexer.mll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ rule initial = parse
354354
| '\n' { new_line lexbuf; initial_linebegin lexbuf }
355355
| whitespace_char_no_newline + { initial lexbuf }
356356
| "/*" { multiline_comment lexbuf; initial lexbuf }
357-
| "//" { singleline_comment lexbuf; initial lexbuf }
357+
| "//" { singleline_comment lexbuf; initial_linebegin lexbuf }
358358
| integer_constant as s { CONSTANT (Cabs.CONST_INT s, currentLoc lexbuf) }
359359
| decimal_floating_constant { CONSTANT (Cabs.CONST_FLOAT
360360
{Cabs.isHex_FI = false;

0 commit comments

Comments
 (0)