1
0
mirror of https://github.com/golang/go synced 2024-11-13 18:30:26 -07:00

fix 6a line number bug -

was incrementing lineno twice for
the \n after a // comment.

R=r
DELTA=3  (0 added, 2 deleted, 1 changed)
OCL=21984
CL=22021
This commit is contained in:
Russ Cox 2009-01-05 11:18:15 -08:00
parent a329471ced
commit c14c2b231f

View File

@ -462,10 +462,8 @@ l1:
if(c1 == '/') {
for(;;) {
c = GETC();
if(c == '\n') {
lineno++;
if(c == '\n')
goto l1;
}
if(c == EOF) {
yyerror("eof in comment");
errorexit();