Age | Commit message (Collapse) | Author | Files | Lines |
|
- 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
|
|
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>
|
|
R=r, rsc
http://codereview.appspot.com/157082
|
|
rsc's algorithm
- applied gofmt -w misc src
- partial CL (remaining files in other CLs)
R=rsc, r
http://go/go-review/1026036
|
|
R=rsc, r
http://go/go-review/1025029
|
|
R=r, iant
CC=go-dev
http://go/go-review/1025024
|
|
- 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
|
|
- added a list of issues to printer/nodes.go
R=rsc
http://go/go-review/1024002
|
|
and parser.go and scanner_test.go which have minor formatting issues)
R=rsc
http://go/go-review/1016042
|
|
(previously not shown in godoc)
- simplify parsing of struct types (match code structure for parsing interface types)
R=rsc, r
http://go/go-review/1016019
|
|
left, like an assignment, like strcpy, etc.
R=rsc
CC=go-dev
http://go/go-review/1016011
|
|
R=rsc
DELTA=1 (1 added, 0 deleted, 0 changed)
OCL=35778
CL=35780
|
|
R=gri
DELTA=1359 (138 added, 32 deleted, 1189 changed)
OCL=35408
CL=35420
|
|
- added extra tests
R=rsc
DELTA=55 (37 added, 0 deleted, 18 changed)
OCL=35250
CL=35276
|
|
(in sync with spec CL 35047)
R=rsc
DELTA=44 (4 added, 8 deleted, 32 changed)
OCL=35048
CL=35054
|
|
R=r
OCL=34731
CL=34731
|
|
- don't print any optional semicolons after declarations inside functions
- indicate non-exported fields/methods in exported types with a comment
so that the "exported source" is legal Go code
- more tests
R=rsc
DELTA=300 (227 added, 25 deleted, 48 changed)
OCL=34697
CL=34730
|
|
R=rsc
DELTA=152 (6 added, 0 deleted, 146 changed)
OCL=34695
CL=34701
|
|
R=rsc
DELTA=10 (5 added, 0 deleted, 5 changed)
OCL=34662
CL=34666
|
|
- printing of expressions: put spaces only where "needed"
- printing of import statements: no double indentation if there are no renames
- print labels on separate lines
- added extra test files
go/ast:
- unified basic literal nodes and as a result deleted duplicated code
- added initial code to track scopes (not fully used yet)
replaces CL 34553
R=rsc
DELTA=881 (579 added, 223 deleted, 79 changed)
OCL=34623
CL=34651
|
|
the last round omitted := range and only
checked 1 out of N vars in a multi-var :=
R=r
OCL=34624
CL=34638
|
|
R=austin
DELTA=34 (34 added, 0 deleted, 0 changed)
OCL=34280
CL=34352
|
|
arithmetic unary operators + - ^
R=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=34338
CL=34350
|
|
- remove visitor pattern interface (not used)
- added non-exported "branding" methods to enforce
node hierarchy
R=rsc
DELTA=174 (13 added, 92 deleted, 69 changed)
OCL=33838
CL=33963
|
|
R=r
DELTA=49 (0 added, 14 deleted, 35 changed)
OCL=33272
CL=33272
|
|
to whole-package compilation.
R=r
OCL=33070
CL=33101
|
|
- support for reverse printing of AST
(for compiler testing)
- added -reverse flag to gofmt
R=rsc
DELTA=163 (125 added, 11 deleted, 27 changed)
OCL=32808
CL=32853
|
|
- 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
|
|
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
|
|
- 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=33 (1 added, 3 deleted, 29 changed)
OCL=31620
CL=31642
|
|
- delete error handling code which is not needed anymore
R=rsc
DELTA=83 (0 added, 65 deleted, 18 changed)
OCL=31572
CL=31602
|
|
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=31449
CL=31451
|
|
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
|
|
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
|
|
- 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
|
|
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
|