aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/runtime.c
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2011-01-25 13:32:56 -0800
committerRobert Griesemer <gri@golang.org>2011-01-25 13:32:56 -0800
commiteaae95fa3d9f54665ef954df26c2fd54a32460c3 (patch)
treea88800c64be311df238bf7461de44ea7760b4876 /src/pkg/runtime/runtime.c
parent2ae953bfc31a9f87daf38df0b185c701a56b32e6 (diff)
downloadgo-eaae95fa3d9f54665ef954df26c2fd54a32460c3.tar.xz
scanner: fix Position returned by Scan, Pos
The implementation of the position computation was surprisingly broken. Implemented fixes and added extra test cases. There is a slight interface change: Calling Pos() returns the current position; but if called before Scan() that position may not be the position of the next token returned by Scan() (depending on the scan settings and the source text) - this in contrast to the original comment. However, after calling Scan(), the Scanner's Position field reports the position of the scanned token, as before. Fixes #1327. R=rsc CC=golang-dev https://golang.org/cl/3972047
Diffstat (limited to 'src/pkg/runtime/runtime.c')
0 files changed, 0 insertions, 0 deletions