go/test/syntax
Robert Griesemer 0775730180 cmd/compile/internal/syntax: better errors for syntax errors in lists
For syntax errors in various (syntactic) lists, instead of reporting
a set of "expected" tokens (which may be incomplete), provide context
and mention "possibly missing" tokens. The result is a friendlier and
more accurate error message.

Fixes #49205.

Change-Id: I38ae7bf62febfe790075e62deb33ec8c17d64476
Reviewed-on: https://go-review.googlesource.com/c/go/+/396914
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-03-31 00:26:58 +00:00
..
chan.go
chan1.go test: match gofrontend error messages 2020-11-28 02:31:54 +00:00
composite.go cmd/compile/internal/syntax: better errors for syntax errors in lists 2022-03-31 00:26:58 +00:00
ddd.go
else.go
if.go
import.go
initvar.go cmd/compile/internal/syntax: generalize error about var decls in init clauses 2017-02-13 23:15:32 +00:00
semi1.go cmd/compile/internal/parser: improved syntax error for incorrect if/for/switch header 2017-02-09 03:54:47 +00:00
semi2.go
semi3.go cmd/compile/internal/parser: improved syntax error for incorrect if/for/switch header 2017-02-09 03:54:47 +00:00
semi4.go test: update gofrontend expected errors 2020-11-30 20:15:10 +00:00
semi5.go
semi6.go test: match gofrontend error messages 2020-12-02 02:56:41 +00:00
semi7.go
topexpr.go
typesw.go cmd/compile/internal/syntax: better error when an assignment is used in value context 2020-02-21 22:57:52 +00:00
vareq.go
vareq1.go