fmt: make ScanState.Token more general.
When writing custom scanners, I found that Token itself was rarely useful, as I did not always want to stop at white space. This change makes it possible to stop at any class of characters while reusing the buffer within State. (also fix a bug in Token) R=r, r2 CC=golang-dev https://golang.org/cl/4243055
Showing
Please
register
or
sign in
to comment