Commit f7b92bb4 authored by Robert Griesemer's avatar Robert Griesemer

fix to scanner_test after change to //-style comment token

R=rsc
OCL=31421
CL=31421
parent ee5fe775
...@@ -221,6 +221,11 @@ func TestScan(t *testing.T) { ...@@ -221,6 +221,11 @@ func TestScan(t *testing.T) {
} }
eloc.Offset += len(lit) + len(whitespace); eloc.Offset += len(lit) + len(whitespace);
eloc.Line += NewlineCount(lit) + whitespace_linecount; eloc.Line += NewlineCount(lit) + whitespace_linecount;
if tok == token.COMMENT && litb[1] == '/' {
// correct for unaccounted '/n' in //-style comment
eloc.Offset++;
eloc.Line++;
}
index++; index++;
return tok != token.EOF; return tok != token.EOF;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment