]> Cypherpunks repositories - gostls13.git/commit
go/printer:
authorRobert Griesemer <gri@golang.org>
Tue, 15 Sep 2009 20:06:24 +0000 (13:06 -0700)
committerRobert Griesemer <gri@golang.org>
Tue, 15 Sep 2009 20:06:24 +0000 (13:06 -0700)
commit7f25485fc67b8d63cfb242d909215494fe5768e4
tree38f88c6025b983a36e51d568d6debef7048aa1b0
parentae54cf73cafad51188863dc5eada1b9d6c4d6a95
go/printer:
- 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
14 files changed:
src/cmd/gofmt/test.sh
src/pkg/Make.deps
src/pkg/go/ast/Makefile
src/pkg/go/ast/ast.go
src/pkg/go/ast/scope.go [new file with mode: 0644]
src/pkg/go/parser/parser.go
src/pkg/go/printer/printer.go
src/pkg/go/printer/printer_test.go
src/pkg/go/printer/testdata/comments.go [moved from src/pkg/go/printer/testdata/source1.go with 95% similarity]
src/pkg/go/printer/testdata/comments.golden [moved from src/pkg/go/printer/testdata/golden1.go with 93% similarity]
src/pkg/go/printer/testdata/comments.x [moved from src/pkg/go/printer/testdata/golden1.x with 100% similarity]
src/pkg/go/printer/testdata/expressions.go [new file with mode: 0644]
src/pkg/go/printer/testdata/expressions.golden [new file with mode: 0644]
src/pkg/go/printer/testdata/linebreaks.golden