]> Cypherpunks repositories - gostls13.git/commit
ast:
authorRobert Griesemer <gri@golang.org>
Fri, 17 Jul 2009 00:11:18 +0000 (17:11 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 17 Jul 2009 00:11:18 +0000 (17:11 -0700)
commitf3ffd93a617be16585586647eb640fe44813251d
treeac8e22f1a710a97c4cbd785b5b8bb2f16efb1d44
parentb75df2f6951d0726229141913aaeea833b0b275d
ast:
- 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
14 files changed:
src/cmd/gobuild/util.go
src/cmd/godoc/godoc.go
src/cmd/gofmt/gofmt.go
src/pkg/Make.deps
src/pkg/Makefile
src/pkg/go/ast/ast.go
src/pkg/go/ast/filter.go
src/pkg/go/doc/doc.go
src/pkg/go/parser/Makefile
src/pkg/go/parser/interface.go [new file with mode: 0644]
src/pkg/go/parser/parser.go
src/pkg/go/parser/parser_test.go
src/pkg/go/printer/printer.go
src/pkg/go/printer/printer_test.go