]> Cypherpunks.ru repositories - gostls13.git/commit
go/ast: add File.GoVersion
authorRuss Cox <rsc@golang.org>
Mon, 13 Mar 2023 21:12:40 +0000 (17:12 -0400)
committerGopher Robot <gobot@golang.org>
Tue, 11 Apr 2023 19:40:45 +0000 (19:40 +0000)
commit3974029671ead7fa0bf093e4372d354c7e620800
tree1408f3731f9a0cb5ccb7d3fa31f84eb3fca04d2a
parent830f54b70ed2ce0c28c8db30876aba67beed7ee3
go/ast: add 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.

This CL adds a GoVersion string field to ast.File, to allow exposing this
per-file Go version information.

For #59033.

Change-Id: I3931ea86c237983d152964f48dce498bcb1f06aa
Reviewed-on: https://go-review.googlesource.com/c/go/+/476276
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
api/next/59033.txt
src/go/ast/ast.go
src/go/ast/example_test.go
src/go/ast/filter.go