]> Cypherpunks repositories - gostls13.git/commit
go/parser: better error synchronization
authorRobert Griesemer <gri@golang.org>
Wed, 7 Mar 2012 20:24:20 +0000 (12:24 -0800)
committerRobert Griesemer <gri@golang.org>
Wed, 7 Mar 2012 20:24:20 +0000 (12:24 -0800)
commitc8981c718b50352e66cb4b08ed5682af1c1a5d75
treed48478d1fcbc044a70f0cb0ddc294f92ead17c3c
parent6b770f05aded85c6e6eabeef498271cdf5df3c71
go/parser: better error synchronization

gofmt reports now a single, accurate error for
the test case of issue 3106.

Also: Added test harness for general error
checking and two test cases for now.

Fixes #3106.

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5755062
src/pkg/go/parser/error_test.go [new file with mode: 0644]
src/pkg/go/parser/parser.go
src/pkg/go/parser/testdata/commas.src [new file with mode: 0644]
src/pkg/go/parser/testdata/issue3106.src [new file with mode: 0644]