mirror of
https://github.com/golang/go.git
synced 2025-10-19 19:13:18 +00:00
go/ast: document that (*ast.File).Comments is sorted by position
This is the way that go/parser produces it and in every AST manipulation that we do, we preserve such property. Also printer expects it is such order. Change-Id: I6a6a696424a679a2cf1f9bb7eb41bdd47523efa9 Reviewed-on: https://go-review.googlesource.com/c/go/+/704255 Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Alan Donovan <adonovan@google.com> Auto-Submit: Alan Donovan <adonovan@google.com>
This commit is contained in:
parent
594deca981
commit
02a888e820
1 changed files with 1 additions and 1 deletions
|
@ -1064,7 +1064,7 @@ type File struct {
|
|||
Scope *Scope // package scope (this file only). Deprecated: see Object
|
||||
Imports []*ImportSpec // imports in this file
|
||||
Unresolved []*Ident // unresolved identifiers in this file. Deprecated: see Object
|
||||
Comments []*CommentGroup // list of all comments in the source file
|
||||
Comments []*CommentGroup // comments in the file, in lexical order
|
||||
GoVersion string // minimum Go version required by //go:build or // +build directives
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue