]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/syntax: rename ErrorMap to CommentMap, make more flexible
authorRobert Griesemer <gri@golang.org>
Thu, 8 Dec 2022 00:57:27 +0000 (16:57 -0800)
committerGopher Robot <gobot@golang.org>
Tue, 17 Jan 2023 19:53:18 +0000 (19:53 +0000)
commit1e0051658345a13ca9be9eeccdce2dabb016c627
tree04aa00fce01bb3d666b2ec234a2ddb9aa9f7d7ec
parent83f8688915de59d974e74dd6accd7a3d54e9a6e7
cmd/compile/internal/syntax: rename ErrorMap to CommentMap, make more flexible

Change the ErrorMap function to collect all comments with a comment
text that matches a given regexp pattern. Also rename it to CommentMap.

Adjust uses and corresponding test.

Adjust various type-checker tests with incorrect ERROR patterns.

For #51006.

Change-Id: I749e8f31b532edbf8568f27ba1546dc849efd143
Reviewed-on: https://go-review.googlesource.com/c/go/+/456155
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Cherry Mui <cherryyz@google.com>
src/cmd/compile/internal/syntax/testing.go
src/cmd/compile/internal/syntax/testing_test.go
src/cmd/compile/internal/types2/check_test.go
src/internal/types/testdata/check/builtins0.go
src/internal/types/testdata/check/decls3.go
src/internal/types/testdata/check/stmt0.go
src/internal/types/testdata/fixedbugs/issue43190.go