type go/ast.Comment
27 uses
go/ast (current package)
ast.go#L64: type Comment struct {
ast.go#L69: func (c *Comment) Pos() token.Pos { return c.Slash }
ast.go#L70: func (c *Comment) End() token.Pos { return token.Pos(int(c.Slash) + len(c.Text)) }
ast.go#L75: List []*Comment // len(List) > 0
commentmap.go#L44: case nil, *CommentGroup, *Comment:
filter.go#L331: var separator = &Comment{token.NoPos, "//"}
filter.go#L369: list := make([]*Comment, ndocs-1) // -1: no separator before first group
walk.go#L43: case *Comment:
go/doc
reader.go#L518: func (r *reader) readNote(list []*ast.Comment) {
go/parser
parser.go#L165: func (p *parser) consumeComment() (comment *ast.Comment, endline int) {
parser.go#L178: comment = &ast.Comment{Slash: p.pos, Text: p.lit}
parser.go#L189: var list []*ast.Comment
parser.go#L192: var comment *ast.Comment
go/printer
comment.go#L15: func formatDocComment(list []*ast.Comment) []*ast.Comment {
comment.go#L18: var directives []*ast.Comment
comment.go#L71: c := &ast.Comment{
comment.go#L75: return []*ast.Comment{c}
comment.go#L79: var out []*ast.Comment
comment.go#L90: out = append(out, &ast.Comment{
comment.go#L96: out = append(out, &ast.Comment{
comment.go#L101: out = append(out, &ast.Comment{
nodes.go#L490: p.setComment(&ast.CommentGroup{List: []*ast.Comment{{Slash: token.NoPos, Text: text}}})
printer.go#L110: func (p *printer) commentsHaveNewline(list []*ast.Comment) bool {
printer.go#L349: func (p *printer) writeCommentPrefix(pos, next token.Position, prev *ast.Comment, tok token.Token) {
printer.go#L629: func (p *printer) writeComment(comment *ast.Comment) {
printer.go#L738: var last *ast.Comment