]> Cypherpunks repositories - gostls13.git/commit
go/ast: document that (*ast.File).Comments is sorted by position
authorMateusz Poliwczak <mpoliwczak34@gmail.com>
Mon, 15 Sep 2025 19:14:25 +0000 (21:14 +0200)
committerAlan Donovan <adonovan@google.com>
Wed, 17 Sep 2025 13:33:19 +0000 (06:33 -0700)
commit02a888e820f67d2b86892c41eeaadc8e32bb6f29
tree89fe72b4950e2eabb7dbc0ed0233233330da857e
parent594deca981f0dd4a9351569e7c3e6999838148e3
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>
src/go/ast/ast.go