go/ast.Comment.Slash (field)
11 uses
go/ast (current package)
ast.go#L66: Slash token.Pos // position of "/" starting the comment
ast.go#L70: func (c *Comment) Pos() token.Pos { return c.Slash }
ast.go#L71: func (c *Comment) End() token.Pos { return token.Pos(int(c.Slash) + len(c.Text)) }
import.go#L213: c.Slash = pos[i].Start - 1
import.go#L219: c.Slash = pos[i].End
go/parser
parser.go#L274: comment = &ast.Comment{Slash: p.pos, Text: p.lit}
go/printer
nodes.go#L436: p.setComment(&ast.CommentGroup{List: []*ast.Comment{{Slash: token.NoPos, Text: text}}})
golang.org/x/pkgsite/internal/godoc
encode_ast.gen.go#L887: if x.Slash != 0 {
encode_ast.gen.go#L889: e.EncodeInt(int64(x.Slash))
encode_ast.gen.go#L916: x.Slash = token.Pos(d.DecodeInt())
golang.org/x/pkgsite/internal/godoc/dochtml/internal/render
linkify.go#L567: (*cg).List = append((*cg).List, &ast.Comment{Slash: pos, Text: text})
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |