]> Cypherpunks repositories - gostls13.git/commit
Show BUG comments in godoc:
authorRobert Griesemer <gri@golang.org>
Thu, 9 Jul 2009 23:38:17 +0000 (16:38 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 9 Jul 2009 23:38:17 +0000 (16:38 -0700)
commit38e7fddc21e2c1c5fbf4f332401b999800a8b5e5
treefd865f0c1add970888e0aa3b5c650605cc14171b
parentec23467e65260bbbcb0faaa4dd053cca9002ace7
Show BUG comments in godoc:

ast.go:
- rename Comments -> CommentGroup (less confusion)
- change all comments/docs to be *CommentGroup

filter.go:
- do not remove unassociated comments from program as part
  of export filtering (they are needed by doc.go for BUG comments)

scanner.go:
- exclude '\n' from //-style comments

parser.go:
- rewrote collection of comments: now all collected comments
  are *ast.CommentGroups
- clarified distinction between leading and trailing comments
- fixed a bug in comment collection (parseGenDecl);
  corresponding test case is in printer/testdata
- extra documentation

doc.go:
- collect BUG comments
- corresponding fix for parser bug in comment collection

comment.go:
- simplified regex

printer.go:
- adjust comment printing to new representation

printer_test.go, testdata/*:
- enable printing of doc comments
- extended tests

package.html, package.txt:
- added Bugs section

gofmt:
- enable printing of doc comments

R=rsc
DELTA=339  (126 added, 38 deleted, 175 changed)
OCL=31403
CL=31416
14 files changed:
lib/godoc/package.html
lib/godoc/package.txt
src/cmd/gofmt/gofmt.go
src/pkg/go/ast/ast.go
src/pkg/go/ast/filter.go
src/pkg/go/doc/comment.go
src/pkg/go/doc/doc.go
src/pkg/go/parser/parser.go
src/pkg/go/printer/printer.go
src/pkg/go/printer/printer_test.go
src/pkg/go/printer/testdata/golden1.go
src/pkg/go/printer/testdata/golden1.x
src/pkg/go/printer/testdata/source1.go
src/pkg/go/scanner/scanner.go