]> Cypherpunks repositories - gostls13.git/commit
scanner: invalidate scanner.Position when no token is present
authorRobert Griesemer <gri@golang.org>
Mon, 17 Oct 2011 23:35:12 +0000 (16:35 -0700)
committerRobert Griesemer <gri@golang.org>
Mon, 17 Oct 2011 23:35:12 +0000 (16:35 -0700)
commitdf219d5197cb1e6fe3be7383466dfcf5d755b24f
treeae8494e8b3c19406a3bc30ce88fb64747f746da3
parente40d6e066a58019f3256635bc19b86b1fe4e7b8a
scanner: invalidate scanner.Position when no token is present

scanner.Position is the position of the most recently
scanned token. Make sure it is invalid if there is no
token scanned and update corresponding comment. This
is particularly important when reporting errors.

Fixes #2371.

R=r
CC=golang-dev
https://golang.org/cl/5294041
src/pkg/scanner/scanner.go
src/pkg/scanner/scanner_test.go