]> Cypherpunks repositories - gostls13.git/commit
go/scanner: Make Init take a *token.File instead of a *token.FileSet.
authorRobert Griesemer <gri@golang.org>
Fri, 14 Jan 2011 01:20:26 +0000 (17:20 -0800)
committerRobert Griesemer <gri@golang.org>
Fri, 14 Jan 2011 01:20:26 +0000 (17:20 -0800)
commitbff2c207e4ccc7a845727d38dec65e1ca4879b69
tree7078320d3b1ee2649ec4946172318128b6a97177
parentb814cca3c391187bc76db2fb2cbf394e18a50726
go/scanner: Make Init take a *token.File instead of a *token.FileSet.

Until now, each scan of a file added a new file to the file set.
With this change, a file can be re-scanned using the same *token.File
w/o changing the file set. Eventually this will enable the re-use of
cached source code in godoc (for the fulltext index). At the moment,
source files are read over and over again from disk.

This is the first step in that direction.

R=r, rsc, r2
CC=golang-dev
https://golang.org/cl/4001041
src/cmd/godoc/format.go
src/cmd/godoc/index.go
src/cmd/godoc/spec.go
src/pkg/ebnf/parser.go
src/pkg/exp/datafmt/parser.go
src/pkg/go/parser/parser.go
src/pkg/go/scanner/scanner.go
src/pkg/go/scanner/scanner_test.go