Age | Commit message (Collapse) | Author | Files | Lines |
|
- prepare for generation of HTML id tags and links
- do HTML-escaping in central print routine
- move tabwriter setup into printer
- fixed various TODOs
godoc:
- removed tabwriter setup, need for various HTML-escaping
R=rsc
DELTA=210 (107 added, 36 deleted, 67 changed)
OCL=32612
CL=32616
|
|
- make token.Position.String more robust
TBR=rsc
DELTA=20 (10 added, 6 deleted, 4 changed)
OCL=32564
CL=32564
|
|
- 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
|
|
R=gri
APPROVED=gri
DELTA=33 (20 added, 6 deleted, 7 changed)
OCL=32544
CL=32546
|
|
- 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
|
|
R=r
DELTA=16 (15 added, 0 deleted, 1 changed)
OCL=32475
CL=32481
|
|
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
|
|
fails without crashing.
R=gri
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=32164
CL=32171
|
|
R=gri
APPROVED=gri
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=31879
CL=31886
|
|
literals and when the parser hits an unexpected EOF. Also,
disallow newlines in character literals.
R=gri
APPROVED=gri
DELTA=23 (15 added, 1 deleted, 7 changed)
OCL=31790
CL=31797
|
|
- 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
|
|
R=rsc
DELTA=17 (8 added, 0 deleted, 9 changed)
OCL=31670
CL=31674
|
|
R=rsc
DELTA=33 (1 added, 3 deleted, 29 changed)
OCL=31620
CL=31642
|
|
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=31574
CL=31604
|
|
- delete error handling code which is not needed anymore
R=rsc
DELTA=83 (0 added, 65 deleted, 18 changed)
OCL=31572
CL=31602
|
|
- handle //line filename:line comments in scanner
- moved error handling code used by various scanner clients
to errors.go
- added extra tests
R=rsc
DELTA=385 (343 added, 18 deleted, 24 changed)
OCL=31551
CL=31601
|
|
R=r
DELTA=8 (6 added, 0 deleted, 2 changed)
OCL=31537
CL=31537
|
|
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=31449
CL=31451
|
|
R=rsc
OCL=31421
CL=31421
|
|
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
|
|
- moved test files from data to testdata
- use tabs instead of spaces for layout
R=rsc
DELTA=129 (67 added, 60 deleted, 2 changed)
OCL=31353
CL=31360
|
|
R=rsc
DELTA=169 (168 added, 0 deleted, 1 changed)
OCL=31319
CL=31321
|
|
- fix a bug w/ optional semicolons
R=rsc
DELTA=46 (24 added, 0 deleted, 22 changed)
OCL=31306
CL=31311
|
|
R=gri
APPROVED=gri
DELTA=73 (48 added, 0 deleted, 25 changed)
OCL=31302
CL=31308
|
|
- fixed typo in parser.go
- removed test w/ syntax errors from gofmt test script
R=rsc
DELTA=25 (21 added, 0 deleted, 4 changed)
OCL=31296
CL=31298
|
|
R=gri
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=31115
CL=31285
|
|
- display: show '...' if a struct/interface has fields/methods removed; show
struct/interface w/o {}'s if all fields/methods were removed; and show the
{}'s if the struct/interface was empty to begin with
R=rsc
DELTA=41 (36 added, 0 deleted, 5 changed)
OCL=31201
CL=31204
|
|
- 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
|
|
- remove a test case w/ syntax errors from test suite
R=rsc
DELTA=104 (44 added, 5 deleted, 55 changed)
OCL=31078
CL=31085
|
|
io.ByteBuffer -> bytes.Buffer
left io.ByteBuffer stub around for now,
for protocol compiler.
R=r
OCL=30861
CL=30872
|
|
R=rsc
APPROVED=r
DELTA=131 (39 added, 10 deleted, 82 changed)
OCL=30669
CL=30723
|
|
R=rsc
DELTA=3 (2 added, 0 deleted, 1 changed)
OCL=30511
CL=30513
|
|
R=rsc
DELTA=8 (4 added, 2 deleted, 2 changed)
OCL=30365
CL=30368
|
|
- removed gratuitous newline in go/printer
R=r
DELTA=15 (2 added, 13 deleted, 0 changed)
OCL=30358
CL=30358
|
|
- replacement for pretty; app to format a single .go file
printer.go (pkg/go/printer):
- replacement for astprinter.go; implements AST printing
- also replaces pkg/go/ast/format.go for now
cleanups:
- removed/saved away old code
R=r,rsc,iant
DELTA=2833 (1183 added, 1628 deleted, 22 changed)
OCL=30226
CL=30306
|
|
TBR=rsc
OCL=30300
CL=30300
|
|
- ast: added extra fields
- parser: extended comment parsing to capture potential trailing comments
Cleanups:
- parser: more documentation, changed various identifiers from _-style to camelCase
R=r,rsc
DELTA=214 (84 added, 13 deleted, 117 changed)
OCL=30259
CL=30299
|
|
R=iant
DELTA=3 (0 added, 3 deleted, 0 changed)
OCL=30251
CL=30251
|
|
- fixed unrelated typo
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=30175
CL=30175
|
|
tests: all.bash passes, gobuild still works, godoc still works.
R=rsc
OCL=30096
CL=30102
|