]> Cypherpunks repositories - gostls13.git/commit
scanner: error handler must be provided to Init
authorRobert Griesemer <gri@golang.org>
Mon, 24 Jan 2011 22:12:20 +0000 (14:12 -0800)
committerRobert Griesemer <gri@golang.org>
Mon, 24 Jan 2011 22:12:20 +0000 (14:12 -0800)
commit1161d190243ea2849299d3384a2b19e32530789a
tree58c53c5c3154aa2ba45a5275bcc9b66eb1426cc6
parentab036abdf02620dd018c27217b3cd15f4042588d
scanner: error handler must be provided to Init

Init may report an error on the first character and
thus one needs an ability to set the error handler
for Init. Was a design bug.

Added corresponding test cases and better documentation.
Also: Fixed a subtle infinite loop exposed by one of the
new test cases.

Fixes #1380.

R=rsc, gri
CC=golang-dev
https://golang.org/cl/4094041
src/pkg/scanner/scanner.go
src/pkg/scanner/scanner_test.go