summaryrefslogtreecommitdiff
path: root/src/pkg/go/doc/doc.go
AgeCommit message (Collapse)AuthorFilesLines
2011-08-03Imported Upstream version 59upstream/59Ondřej Surý1-1/+1
2011-06-30Imported Upstream version 58upstream/58Ondřej Surý1-0/+24
2011-04-28Imported Upstream version 2011.04.27upstream/2011.04.27Ondřej Surý1-1/+1
2011-04-26Imported Upstream version 2011.04.13upstream/2011.04.13Ondřej Surý1-4/+4
2011-02-14Imported Upstream version 2011-02-01.1upstream/2011-02-01.1Ondřej Surý1-1/+1
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý1-42/+32
2010-05-26godoc: collect package comments from all package files, not just the first ↵Robert Griesemer1-6/+23
one found R=r CC=golang-dev http://codereview.appspot.com/1331041
2010-03-29godoc: support for filtering of command-line output in -src modeRobert Griesemer1-41/+20
+ various minor cleanups Usage: godoc -src math Sin R=rsc CC=golang-dev http://codereview.appspot.com/791041
2010-03-26bytes, strings: IndexOfAnyRobert Griesemer1-9/+2
+ first use in go/doc R=r CC=golang-dev http://codereview.appspot.com/781041
2010-03-18go/doc cleanup: remove some unnecessary string conversionsRobert Griesemer1-3/+2
R=rsc CC=golang-dev http://codereview.appspot.com/642041
2010-03-05godoc: don't throw away function documentationRobert Griesemer1-4/+22
if there are multiple functions (for a package, type) with the same name Fixes issue 642. R=rsc CC=golang-dev http://codereview.appspot.com/243041
2010-02-24go/ast: streamline representation of field listsRobert Griesemer1-4/+4
- always include position information about opening/closing parens/braces - replace uses of []*ast.Field with *ast.FieldList Fixes issue 473. R=rsc CC=golang-dev http://codereview.appspot.com/223043
2010-02-19go/ast: use a slice instead of a linked list for the list of commentsRobert Griesemer1-2/+2
(this will simplify some further changes) removed several TODOs R=rsc CC=golang-dev http://codereview.appspot.com/216059
2010-02-16remove assumption that all files belonging to a package are in the same ↵Robert Griesemer1-5/+3
directory: - adjust ast.Package node and doc.PackageDoc correspondingly - introduce parser.ParseFiles R=rsc CC=golang-dev http://codereview.appspot.com/207087
2010-01-15 Steps towards tracking scopes for identifiers.Robert Griesemer1-10/+10
- Identifiers refer now to the language entity (Object) that they denote. At the moment this is at best an approximation. - Initial data structures for language entities (Objects) and expression types (Type) independent of the actual type notations. - Initial support for declaring and looking up identifiers. - Updated various dependent files and added support functions. - Extensively tested to avoid breakage. This is an AST change. R=rsc CC=golang-dev, rog http://codereview.appspot.com/189080
2009-12-151) Change default gofmt default settings forRobert Griesemer1-195/+195
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 3rd set of files. R=rsc CC=golang-dev http://codereview.appspot.com/180048
2009-12-03- include type-associated consts and vars when filtering a PackageDocRobert Griesemer1-7/+9
- fixes a godoc issue (for instance, "godoc os EOF" now shows an entry) R=r CC=rsc http://codereview.appspot.com/165042
2009-11-24Change to container/vector interface:Robert Griesemer1-3/+3
- removed New(len int) in favor of new(Vector).Resize(len, cap) - removed Init(len int) in favor of Resize(len, cap) - runs all.bash Fixes issue 294. R=rsc, r, r1 http://codereview.appspot.com/157143
2009-11-20gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkgRuss Cox1-2/+2
R=r, gri CC=golang-dev http://codereview.appspot.com/156115
2009-11-09 - replaced gofmt expression formatting algorithm withRobert Griesemer1-1/+1
rsc's algorithm - applied gofmt -w misc src - partial CL (remaining files in other CLs) R=rsc, r http://go/go-review/1026036
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer1-30/+30
R=rsc, r http://go/go-review/1025029
2009-11-08added package documentationRobert Griesemer1-0/+1
R=r, rsc http://go/go-review/1025023
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer1-21/+7
- enabled for function declarations (not just function literals) - applied gofmt -w $GOROOT/src (look for instance at src/pkg/debug/elf/elf.go) R=r, rsc CC=go-dev http://go/go-review/1026006
2009-11-04gofmt-ify src/pkg/go (excluding printer directory due to pending CL,Robert Griesemer1-2/+2
and parser.go and scanner_test.go which have minor formatting issues) R=rsc http://go/go-review/1016042
2009-11-02use the new routine regexp.MustCompile to clean up some code that uses ↵Rob Pike1-15/+2
global regexps. R=rsc, gri CC=go-dev http://go/go-review/1016025
2009-10-27files that are okay from the last gofmt roundRuss Cox1-4/+4
R=gri http://go/go-review/1015011
2009-10-15Work-around for factory function heuristic failure:Robert Griesemer1-9/+27
only associate a couple of functions as factories for os.Error. Replaces CL 35628 (abandoned). R=rsc DELTA=35 (26 added, 0 deleted, 9 changed) OCL=35754 CL=35768
2009-10-08more lgtm files from gofmtRuss Cox1-71/+87
R=gri OCL=35485 CL=35488
2009-10-06fix build - missing from 35404Russ Cox1-0/+7
TBR=gri OCL=35411 CL=35411
2009-09-17unused importsRuss Cox1-3/+0
R=r OCL=34731 CL=34731
2009-09-16publish doc.CommentTextRuss Cox1-17/+5
R=gri DELTA=29 (10 added, 12 deleted, 7 changed) OCL=34709 CL=34712
2009-09-15more "declared and not used".Russ Cox1-1/+1
the last round omitted := range and only checked 1 out of N vars in a multi-var := R=r OCL=34624 CL=34638
2009-09-01don't show exported methods of non-exported typesRobert Griesemer1-33/+13
R=rsc DELTA=44 (10 added, 30 deleted, 4 changed) OCL=34195 CL=34200
2009-08-31simplified heuristic for associating const/var decls with typesRobert Griesemer1-21/+15
(per suggestion from rsc) R=rsc DELTA=24 (3 added, 9 deleted, 12 changed) OCL=34121 CL=34130
2009-08-31associate const and var declarations with a type where possibleRobert Griesemer1-18/+82
R=rsc DELTA=105 (87 added, 7 deleted, 11 changed) OCL=34062 CL=34119
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 Cox1-4/+0
to whole-package compilation. R=r OCL=33070 CL=33101
2009-08-05support []byte (more efficient) as well as string in the interfaces.Rob Pike1-3/+3
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 Griesemer1-20/+77
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-09mv src/lib to src/pkgRob Pike1-0/+486
tests: all.bash passes, gobuild still works, godoc still works. R=rsc OCL=30096 CL=30102