summaryrefslogtreecommitdiff
path: root/src/pkg/go/doc
AgeCommit message (Collapse)AuthorFilesLines
2009-08-28- don't associate factory methods to basic types (which have no explicit ↵Robert Griesemer1-12/+61
declarations) - be more robust in the presence of absent type declarations R=rsc DELTA=81 (63 added, 14 deleted, 4 changed) OCL=34033 CL=34036
2009-08-28- collect consts and vars in one listRobert Griesemer1-75/+69
- handle absence of forward-decls correctly (cannot assume a type was declared before it was used) R=rsc DELTA=112 (32 added, 38 deleted, 42 changed) OCL=34008 CL=34027
2009-08-12convert non-low-level non-google pkg codeRuss Cox2-65/+5
to whole-package compilation. R=r OCL=33070 CL=33101
2009-08-05support []byte (more efficient) as well as string in the interfaces.Rob Pike2-6/+6
change the names; Match is for []byte and MatchString is for string, etc. R=rsc DELTA=195 (155 added, 0 deleted, 40 changed) OCL=32800 CL=32800
2009-07-31fix long-standing bug in doc reader:Robert Griesemer1-7/+22
- replace forward-declared types with complete declaration when it is found R=rsc DELTA=23 (15 added, 0 deleted, 8 changed) OCL=32618 CL=32618
2009-07-30go/ast/filter.go:Robert Griesemer1-25/+49
- more orthogonal functionality of filter functions for better re-use go/doc/doc.go: - simplified interface - collect filenames of packages so that they can be shown godoc: - removed TODO, show list of package (linked) files used to create documentation R=rsc DELTA=130 (68 added, 24 deleted, 38 changed) OCL=32549 CL=32552
2009-07-28Intersperse comments nicely when printing an AST.Robert Griesemer1-5/+16
gofmt formatted source code looks pretty good already; with a bit more fine-tuning it should be great. printer.go: - Implemented comment intersperse algorithm. The approach is a result of many trial-and-error experiments but at this point reasonably simple and open to arbitrary fine-tuning. parser.go: - Simplified handling of lead and line comments (formerly called leading and trailing comments). - Use a comments list instead of an array (I may change this back - this is not obviously better and uses more space). doc.go: - Remove comments from AST nodes that have been 'consumed' in the documentation to avoid duplicate printing of them. Allows for better control of what is printed w/o use of printing control flags (which are hard to use and not fine-grained enough). Corresponding adjustments to various clients of these files. R=rsc DELTA=478 (275 added, 108 deleted, 95 changed) OCL=32185 CL=32380
2009-07-16ast:Robert Griesemer1-7/+7
- renamed Program -> SourceFile - added Package node representing the AST for an entire package - added filter function to create a source file mimicking the interface of an entire package parser: - parser entry to parse entire packages - unified naming of parser entry points - factored out entry points into new file (interface.go) gofmt: - extended to accept single .go files, and package paths: gofmt file.go // formatting of a single file gofmt -x file.go // interface of a single file gofmt -x ./MyPackage // interface of a local package gofmt -x math // interface of a $GOROOT relative package Various adjustments in dependent files, documentation. R=rsc DELTA=634 (369 added, 153 deleted, 112 changed) OCL=31743 CL=31748
2009-07-15- do not collect BUG comments w/o bug descriptionRobert Griesemer1-9/+17
R=rsc DELTA=17 (8 added, 0 deleted, 9 changed) OCL=31670 CL=31674
2009-07-13- handle type forward declarations correctlyRobert Griesemer1-2/+8
R=r DELTA=8 (6 added, 0 deleted, 2 changed) OCL=31537 CL=31537
2009-07-09Show BUG comments in godoc:Robert Griesemer2-21/+78
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
2009-07-06- ast.FilterExports: strips all non-exported nodes from an ASTRobert Griesemer1-40/+10
- use FilterExports instead of the various predicates in printer.go and doc.go which simplifies a lot of code and makes it easier to deal with complex cases R=rsc DELTA=445 (197 added, 190 deleted, 58 changed) OCL=31110 CL=31196
2009-06-29io.StringBytes -> strings.BytesRuss Cox1-6/+6
io.ByteBuffer -> bytes.Buffer left io.ByteBuffer stub around for now, for protocol compiler. R=r OCL=30861 CL=30872
2009-06-24Change strings.Split, bytes.Split to take a maximum substring count argument.David Symonds1-1/+1
R=rsc APPROVED=r DELTA=131 (39 added, 10 deleted, 82 changed) OCL=30669 CL=30723
2009-06-09mv src/lib to src/pkgRob Pike3-0/+864
tests: all.bash passes, gobuild still works, godoc still works. R=rsc OCL=30096 CL=30102