]> Cypherpunks repositories - gostls13.git/commit
go/parser: more tolerant parsing of import declarations
authorRobert Griesemer <gri@golang.org>
Wed, 31 Aug 2022 20:43:28 +0000 (13:43 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 2 Sep 2022 02:09:06 +0000 (02:09 +0000)
commitd394f99f49aa9249324f7c3ef3bc77a7cc1cebf7
tree9566200ba7d489a05c4be904a14c95930aa910ab
parenta330ca5c541e99e4561420c852b14df63574a065
go/parser: more tolerant parsing of import declarations

This is a port of CL 427156 from the syntax package's parser
to go/parser.

While at it, remove an unused token.Pos parameter from
parseSpecFunction and dependent declarations.

Also, consolidate the respective test file.

For #54511.

Change-Id: Id6a28eb3d23a46fa5fa1d85d2c4e634b7015513c
Reviewed-on: https://go-review.googlesource.com/c/go/+/427157
Run-TryBot: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
src/cmd/compile/internal/types2/testdata/fixedbugs/issue43190.go
src/go/parser/parser.go
src/go/types/testdata/fixedbugs/issue43190.go