Fix line number error with to end of line comments.
The single line comment "//" was getting double counted.
This commit is contained in:
parent
74c20eccf6
commit
cbce1ddc04
|
|
@ -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