1
0
mirror of https://github.com/golang/go synced 2024-11-25 02:47:58 -07:00

fix build (this time for real): adjust typechecker test, ogle

R=r, r2
CC=golang-dev
https://golang.org/cl/4006041
This commit is contained in:
Robert Griesemer 2011-01-13 17:41:45 -08:00
parent 8b41055656
commit 4ed7c59a50
2 changed files with 4 additions and 2 deletions

View File

@ -64,7 +64,8 @@ func Main() {
func newScanner(input []byte) (*scanner.Scanner, *scanner.ErrorVector) { func newScanner(input []byte) (*scanner.Scanner, *scanner.ErrorVector) {
sc := new(scanner.Scanner) sc := new(scanner.Scanner)
ev := new(scanner.ErrorVector) ev := new(scanner.ErrorVector)
sc.Init(fset, "input", input, ev, 0) file := fset.AddFile("input", fset.Base(), len(input))
sc.Init(file, input, ev, 0)
return sc, ev return sc, ev
} }

View File

@ -68,7 +68,8 @@ func expectedErrors(t *testing.T, pkg *ast.Package) (list scanner.ErrorList) {
} }
var s scanner.Scanner var s scanner.Scanner
s.Init(fset, filename, src, nil, scanner.ScanComments) file := fset.AddFile(filename, fset.Base(), len(src))
s.Init(file, src, nil, scanner.ScanComments)
var prev token.Pos // position of last non-comment token var prev token.Pos // position of last non-comment token
loop: loop:
for { for {