summaryrefslogtreecommitdiff
path: root/src/cmd/godoc/godoc.go
AgeCommit message (Collapse)AuthorFilesLines
2009-07-30go/ast/filter.go:Robert Griesemer1-6/+2
- 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-29parser:Robert Griesemer1-136/+69
- Changed filter function for parser.ParsePackage to take an *os.Dir instead of a filename for more powerful filters - Removed TODO in ast.PackageInterface: Now collect package comments from all package files - Cleanups in godoc: Use the new ParsePackage and PackageInterface functions; as a result computing package information is much simpler now. R=rsc DELTA=285 (80 added, 110 deleted, 95 changed) OCL=32473 CL=32486
2009-07-28Intersperse comments nicely when printing an AST.Robert Griesemer1-5/+1
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-9/+11
- 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-14- removed TODO, minor adjustmentsRobert Griesemer1-9/+14
R=rsc DELTA=16 (6 added, 1 deleted, 9 changed) OCL=31638 CL=31641
2009-07-14update remaining files to match new scanner/parser interfaceRobert Griesemer1-2/+3
and use shared error handling infrastructure R=rsc DELTA=109 (3 added, 86 deleted, 20 changed) OCL=31600 CL=31605
2009-07-06- ast.FilterExports: strips all non-exported nodes from an ASTRobert Griesemer1-4/+9
- 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-07-02fix bug in $GOROOT handling: error calling Getenv.Rob Pike1-1/+1
R=gri OCL=31047 CL=31047
2009-06-29io.StringBytes -> strings.BytesRuss Cox1-8/+9
io.ByteBuffer -> bytes.Buffer left io.ByteBuffer stub around for now, for protocol compiler. R=r OCL=30861 CL=30872
2009-06-26Getenv: almost no one wants the error, so make it return a string that may ↵Rob Pike1-3/+2
be empty. Getenverror is the new name for the old routine that returns an error too. R=rsc DELTA=35 (7 added, 7 deleted, 21 changed) OCL=30818 CL=30821
2009-06-16forgot to adjust tmprootRobert Griesemer1-1/+1
R=rsc DELTA=1 (0 added, 0 deleted, 1 changed) OCL=30342 CL=30342
2009-06-16move godoc to src/cmd/godocRobert Griesemer1-0/+707
R=rsc DELTA=945 (944 added, 0 deleted, 1 changed) OCL=30315 CL=30341