summaryrefslogtreecommitdiff
path: root/src/cmd/godoc
AgeCommit message (Collapse)AuthorFilesLines
2010-01-27More steps towards tracking of identifier scopes.Robert Griesemer2-4/+4
- provide scope to parse functions; if non-nil, parser uses the scope to declare and lookup identifiers - resolve forward references where possible R=rsc CC=golang-dev http://codereview.appspot.com/194098
2010-01-22Trim space on input to make searching more robust.Christopher Wedgwood1-1/+1
R=rsc, r, gri CC=golang-dev http://codereview.appspot.com/186255 Committer: Rob Pike <r@golang.org>
2010-01-15 Steps towards tracking scopes for identifiers.Robert Griesemer3-9/+9
- 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
2010-01-13Distinguish between html generation and html quoting in godoc formatters.Robert Griesemer1-0/+9
Replacement for CL 184084; originally by Roger Peppe (rogpeppe@gmail.com). R=rsc CC=golang-dev, rog http://codereview.appspot.com/189059
2010-01-13godoc: skip template wrapping for complete HTML filesRuss Cox1-0/+22
demo at http://wreck:8080/doc/ click on go_talk-20100112.html R=gri CC=golang-dev http://codereview.appspot.com/186137
2010-01-11Remove -oldprinter flag from gofmt; all code isRobert Griesemer1-1/+1
now printed using the semicolon-free style. Removed NoSemis flag and mechanism dealing with optional semicolons from go/printer. Updated all go/printer output files using the semi-colon free style. Changes have no formatting impact on checked in go code under src and misc. R=rsc, r CC=golang-dev http://codereview.appspot.com/184068
2010-01-06godoc: serve index.html in place of directory listing, when presentRuss Cox1-0/+10
R=gri CC=golang-dev http://codereview.appspot.com/181155
2010-01-04Simplified parser interface.Robert Griesemer1-3/+11
R=rsc, r CC=golang-dev, rog http://codereview.appspot.com/183116
2009-12-28Fix bug in godoc tab conversion filter:Robert Griesemer1-5/+13
tabs after an empty line where not converted. Also, made it more robust in the presence of (unexpected) ' ' and '\v' chars in indentation mode. R=r CC=golang-dev http://codereview.appspot.com/181085
2009-12-17use new tab indentation format in godoc, but convertRobert Griesemer1-2/+70
leading tabs into spaces to ensure a good outcome in most browsers R=rsc http://codereview.appspot.com/165051
2009-12-15 1) Change default gofmt default settings forRobert Griesemer5-665/+665
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 1st set of files. R=rsc CC=agl, golang-dev, iant, ken2, r http://codereview.appspot.com/180047
2009-12-14don't show semicolons anymore with godocRobert Griesemer1-1/+1
R=rsc http://codereview.appspot.com/174078
2009-12-09remove uses of string concatenation from src and misc directoryRobert Griesemer1-1/+1
R=rsc http://codereview.appspot.com/172041
2009-12-07the AST walker currently provides no way to find out how theRoger Peppe1-3/+6
nodes in the tree are nested with respect to one another. a simple change to the Visitor interface makes it possible to do this (for example to maintain a current node-depth, or a knowledge of the name of the current function). Visit(nil) is called at the end of a node's children; this make possible the channel-based interface below, amongst other possibilities. It is still just as simple to get the original behaviour - just return the same Visitor from Visit. Here are a couple of possible Visitor types. // closure-based type FVisitor func(n interface{}) FVisitor func (f FVisitor) Visit(n interface{}) Visitor { return f(n); } // channel-based type CVisitor chan Visit; type Visit struct { node interface{}; reply chan CVisitor; }; func (v CVisitor) Visit(n interface{}) Visitor { if n == nil { close(v); } else { reply := make(chan CVisitor); v <- Visit{n, reply}; r := <-reply; if r == nil { return nil; } return r; } return nil; } R=gri CC=rsc http://codereview.appspot.com/166047 Committer: Robert Griesemer <gri@golang.org>
2009-12-02move ReadFile, WriteFile, and ReadDir into a separate io/ioutil package.Rob Pike1-5/+6
this breaks the dependency of package io on package bytes. R=rsc CC=golang-dev http://codereview.appspot.com/163085
2009-12-01some godoc cleanup:Robert Griesemer2-99/+28
- simplified dealing with parse errors: no need to intersperse them in the source - improve visibility of highlighted identifiers by showing them in bold R=rsc http://codereview.appspot.com/163051
2009-11-24Change to container/vector interface:Robert Griesemer1-1/+1
- 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-24godoc: plug file descriptor leakRuss Cox1-0/+1
R=gri CC=r http://codereview.appspot.com/157149
2009-11-23go: makes it build for the case $GOROOT has whitespacesSergio Luis O. B. Correia1-2/+2
the bash scripts and makefiles for building go didn't take into account the fact $GOROOT / $GOBIN could both be directories containing whitespaces, and was not possible to build it in such a situation. this commit adjusts the various makefiles/scripts to make it aware of that possibility, and now it builds successfully when using a path with whitespaces as well. Fixes issue 115. R=rsc, dsymonds1 http://codereview.appspot.com/157067 Committer: Russ Cox <rsc@golang.org>
2009-11-20gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkgRuss Cox2-6/+6
R=r, gri CC=golang-dev http://codereview.appspot.com/156115
2009-11-16Don't emit line tags when source code is printed as part ofRobert Griesemer1-3/+10
package documentation using templates. The line tag interferes with the anchor tag introduces by the template. This fixes an an issue where some headers lost their ability to link to the respective source code. R=rsc http://codereview.appspot.com/154166
2009-11-09- replaced gofmt expression formatting algorithm withRobert Griesemer4-25/+25
rsc's algorithm - applied gofmt -w misc src - partial CL (remaining files in other CLs) R=rsc, r http://go/go-review/1024040
2009-11-09TBR:Robert Griesemer1-1/+1
fix typo that prevented function bodies from being indexed (ouch!) R=rsc http://go/go-review/1024035
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer5-134/+134
R=rsc, r http://go/go-review/1025029
2009-11-09tweak documentation of commandsRuss Cox1-1/+1
so that first sentence is better for cmd page. live at http://r45:3456/cmd/ R=gri, r http://go/go-review/1024034
2009-11-08- exit godoc w/o crashing if negative tabwidth is providedRobert Griesemer1-10/+9
- minor related cleanups R=rsc http://go/go-review/1025026
2009-11-08Addressing issue brought up by dsymonds:Robert Griesemer2-17/+42
- When providing alternative spellings to a query, do not prefix it with a package qualifier as the suggestion may not have any results. Correctly filtering is quite a bit of work, and clicking the alternative spelling will always also show the qualified hits if they exist (but also others). Seems good enough for now. - Give user feedback when the query syntax was wrong. - Package names in search results are now links to the respective package documentation. - Experimented with excluding main packages and test files from index with inconclusive results. Code is present and can be enabled by changing a flag in the source. This needs some more work. R=rsc CC=r, dsymonds http://go/go-review/1026033
2009-11-08improved sentence extraction:Robert Griesemer1-10/+28
- don't forget first periods - look at capitalization of last char before periods R=rsc http://go/go-review/1024027
2009-11-08a nagging inconsistency: capitalization ofRuss Cox3-49/+49
HTML vs Html, URL vs Url, HTTP vs Http, current source is 6:1 in favor of the former, so change instances of the latter. R=r CC=go-dev http://go/go-review/1024026
2009-11-08use grouping instead of colors to show non-global search hits:Robert Griesemer2-70/+119
- introduced a new run per file containing all spots belonging to the same kind (e.g. var decl, const decl, etc.) - more comments, better index.go file organization R=rsc http://go/go-review/1026028
2009-11-08fix sentence extractionRobert Griesemer1-6/+13
R=rsc http://go/go-review/1026027
2009-11-08- properly align package synopsesRobert Griesemer1-31/+153
(this was surprisingly hard to get right in HTML) - show modification times in source directory listings - various tweaks R=rsc http://go/go-review/1024024
2009-11-08TBRRobert Griesemer1-1/+1
1st step of renaming dirList.html -> dirlist.html (OS X filenames are not capitalization-sensitive) R=rsc http://go/go-review/1024021
2009-11-08- better support for text files: show them nicely formattedRobert Griesemer1-21/+88
instead of serving them raw - path-related cleanups R=rsc http://go/go-review/1026021
2009-11-07- added link to sourcesRobert Griesemer1-5/+5
- renamed listing.html -> dirList.html (there is a dirs.html already, it should probably have a better name, too) R=rsc http://go/go-review/1025020
2009-11-07nice directory listingsRobert Griesemer1-9/+46
R=rsc http://go/go-review/1026020
2009-11-07- support to extract one-line package synopsis for package listingsRobert Griesemer1-2/+25
- formatting in dirs.html is crude, needs better html (open to suggestions), but shows the synopsis - many package comments should probably be adjusted such that the first sentence is more concise R=rsc, iant http://go/go-review/1025014
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer2-51/+17
- 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-06updated godoc documentationRobert Griesemer1-3/+17
R=r http://go/go-review/1026007
2009-11-05gofmt'ed src/cmdRobert Griesemer3-31/+31
R=rsc http://go/go-review/1024004
2009-11-04document godoc and gofmtRob Pike1-0/+46
R=rsc http://go/go-review/1018036
2009-11-04remove reference to /home/rRobert Griesemer1-1/+1
R=rsc http://go/go-review/1018039
2009-11-03support for command documentation:Robert Griesemer2-43/+95
- made package tree handler generic so it can work on any fs tree - cleanups along the way R=rsc CC=r http://go/go-review/1017020
2009-11-03use default styler when there is no other givenRobert Griesemer1-2/+6
(No visual change yet since the comments for exported code snippets - as shown on the pkg page - are not yet formatted using the standard comment intersperse mechanism in the printer. This is a TODO in the printer.) R=rsc http://go/go-review/1016031
2009-11-02- show recursive package directory structure in package pagesRobert Griesemer2-85/+106
- removed some underbars in section headings for better looks - various minor tweaks R=rsc http://go/go-review/1018026
2009-11-02forgot to count newlines when scanning white space.Rob Pike1-2/+2
also fix a error-printing bug in godoc. R=gri http://go/go-review/1016030
2009-11-02- initial steps towards showing directory tree instead ofRobert Griesemer2-15/+102
just a single directory - all pieces present but not well integrated - directory tree served at the moment under /tree R=rsc http://go/go-review/1018016
2009-11-01reverse the arguments to io.Copy so the destination is on theRob Pike1-1/+1
left, like an assignment, like strcpy, etc. R=rsc CC=go-dev http://go/go-review/1016011
2009-11-01don't update sync time if no files have changedRobert Griesemer1-12/+18
(and thus avoid re-indexing after every sync attempt) R=rsc http://go/go-review/1016010
2009-10-30split godoc/godoc.go into godoc/godoc.goRuss Cox3-204/+236
and godoc/main.go. R=gri CC=r http://go/go-review/1017005