aboutsummaryrefslogtreecommitdiff
path: root/src/go/ast/ast.go
diff options
context:
space:
mode:
authorOlivier Mengué <olivier.mengue@gmail.com>2024-03-27 23:09:23 +0100
committerGopher Robot <gobot@golang.org>2024-03-28 21:32:41 +0000
commit3f90ba7f1f0ecb230105ad1068ffdc3c2f9a8a97 (patch)
tree0e1a3e0ef837b144a3b4f2aa3a6bbe97a4d25876 /src/go/ast/ast.go
parentfae6eb5f2fc422447e3ca324c895503e9166d247 (diff)
downloadgo-3f90ba7f1f0ecb230105ad1068ffdc3c2f9a8a97.tar.gz
go-3f90ba7f1f0ecb230105ad1068ffdc3c2f9a8a97.zip
go/ast: more godoc links
Change-Id: I1290ad66d3c758c3b89caf0a217cb3d5358c5dd2 Reviewed-on: https://go-review.googlesource.com/c/go/+/574696 Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/go/ast/ast.go')
-rw-r--r--src/go/ast/ast.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/go/ast/ast.go b/src/go/ast/ast.go
index ef96cc4a6d..73aa3da89e 100644
--- a/src/go/ast/ast.go
+++ b/src/go/ast/ast.go
@@ -1032,9 +1032,12 @@ func (*FuncDecl) declNode() {}
// positions). A [CommentMap] may be used to facilitate some of these operations.
//
// Whether and how a comment is associated with a node depends on the
-// interpretation of the syntax tree by the manipulating program: Except for Doc
+// interpretation of the syntax tree by the manipulating program: except for Doc
// and [Comment] comments directly associated with nodes, the remaining comments
-// are "free-floating" (see also issues #18593, #20744).
+// are "free-floating" (see also issues [#18593], [#20744]).
+//
+// [#18593]: https://go.dev/issue/18593
+// [#20744]: https://go.dev/issue/20744
type File struct {
Doc *CommentGroup // associated documentation; or nil
Package token.Pos // position of "package" keyword
@@ -1080,7 +1083,7 @@ func (p *Package) End() token.Pos { return token.NoPos }
// not handwritten, by detecting the special comment described
// at https://go.dev/s/generatedcode.
//
-// The syntax tree must have been parsed with the ParseComments flag.
+// The syntax tree must have been parsed with the [parser.ParseComments] flag.
// Example:
//
// f, err := parser.ParseFile(fset, filename, src, parser.ParseComments|parser.PackageClauseOnly)