]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: better error message when offending/missing token is a keyword
authorRobert Griesemer <gri@golang.org>
Thu, 31 Oct 2024 18:19:28 +0000 (11:19 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 14 Nov 2024 02:14:13 +0000 (02:14 +0000)
commit2eac154b1c8b51d05fa5b110ae065d3610a61e06
treeafecc69592011a077c1eef9e8539c8ea96826557
parent3730814f2f2bf24550920c39a16841583de2dac1
cmd/compile: better error message when offending/missing token is a keyword

Prefix keywords (type, default, case, etc.) with "keyword" in error
messages to make them less ambiguous.

Fixes #68589.

Change-Id: I1eb92d1382f621b934167b3a4c335045da26be9f
Reviewed-on: https://go-review.googlesource.com/c/go/+/623819
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Tim King <taking@google.com>
src/cmd/compile/internal/syntax/parser.go
src/cmd/compile/internal/syntax/testdata/issue68589.go [new file with mode: 0644]
test/fixedbugs/issue11610.go
test/switch2.go
test/syntax/semi7.go