Fix line number error with to end of line comments.
The single line comment "//" was getting double counted.
(cherry picked from commit cbce1ddc04)
This commit is contained in:
parent
4ee4d735c3
commit
855daae00f
|
|
@ -50,12 +50,12 @@ static int yywrap(void)
|
|||
%%
|
||||
|
||||
/* Skip C++-style comments. */
|
||||
"//".* { sdflloc.first_line += 1; }
|
||||
"//".* { ; }
|
||||
|
||||
/* Skip C-style comments. */
|
||||
"/*" { BEGIN(CCOMMENT); }
|
||||
<CCOMMENT>. { yymore(); }
|
||||
<CCOMMENT>\n { sdflloc.first_line += 1; yymore(); }
|
||||
<CCOMMENT>. { ; }
|
||||
<CCOMMENT>\n { sdflloc.first_line += 1; }
|
||||
<CCOMMENT>"*/" { BEGIN(0); }
|
||||
|
||||
[ \m\t] { /* Skip white space. */; }
|
||||
|
|
|
|||
Loading…
Reference in New Issue