1
0
mirror of https://github.com/golang/go synced 2024-11-26 00:38:00 -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 == '/') { if(c1 == '/') {
for(;;) { for(;;) {
c = GETC(); c = GETC();
if(c == '\n') { if(c == '\n')
lineno++;
goto l1; goto l1;
}
if(c == EOF) { if(c == EOF) {
yyerror("eof in comment"); yyerror("eof in comment");
errorexit(); errorexit();