aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/plugin.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2023-03-13 17:35:03 -0400
committerGopher Robot <gobot@golang.org>2023-04-13 18:39:29 +0000
commit92a3cb9ed14bce659540de8fef5e11fdb4973946 (patch)
tree09c05ded0ac41226a5378e48b3d4506a785992e7 /src/runtime/plugin.go
parent3de5b4da26b0062c9fd1b84849a0d4b7e78aaf5a (diff)
downloadgo-92a3cb9ed14bce659540de8fef5e11fdb4973946.tar.xz
go/parser: report //go:build-derived Go version in ast.File.GoVersion
For #57001, compilers and others tools will need to understand that a different Go version can be used in different files in a program, according to the //go:build lines in those files. Update go/parser to populate the new ast.File.GoVersion field. This requires running the go/scanner in ParseComments mode always and then implementing discarding of comments in the parser instead of the scanner. The same work is done either way, since the scanner was already preparing the comment result and then looping. The loop has just moved into go/parser. Also make the same changes to cmd/compile/internal/syntax, both because they're necessary and to keep in sync with go/parser. For #59033. Change-Id: I7b867f5f9aaaccdca94af146b061d16d9a3fd07f Reviewed-on: https://go-review.googlesource.com/c/go/+/476277 Auto-Submit: Russ Cox <rsc@golang.org> Reviewed-by: Robert Griesemer <gri@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/runtime/plugin.go')
0 files changed, 0 insertions, 0 deletions