mirror of
https://github.com/golang/go
synced 2024-11-26 02:37:58 -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:
parent
a329471ced
commit
c14c2b231f
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user