diff options
| author | Robert Griesemer <gri@golang.org> | 2011-01-25 13:32:56 -0800 |
|---|---|---|
| committer | Robert Griesemer <gri@golang.org> | 2011-01-25 13:32:56 -0800 |
| commit | eaae95fa3d9f54665ef954df26c2fd54a32460c3 (patch) | |
| tree | a88800c64be311df238bf7461de44ea7760b4876 /src/pkg/runtime/runtime.c | |
| parent | 2ae953bfc31a9f87daf38df0b185c701a56b32e6 (diff) | |
| download | go-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
