1
0
mirror of https://github.com/golang/go synced 2024-11-21 22:34:48 -07:00

go/scanner: delete unnecessary type declarations

R=rsc, r2
CC=golang-dev
https://golang.org/cl/2735041
This commit is contained in:
Robert Griesemer 2010-10-25 17:44:54 -07:00
parent 5556f733c7
commit c77f090085

View File

@ -427,14 +427,11 @@ func TestSemis(t *testing.T) {
}
type seg struct {
var segments = []struct {
srcline string // a line of source text
filename string // filename for current token
line int // line number for current token
}
var segments = []seg{
}{
// exactly one token per line since the test consumes one token per segment
{" line1", "TestLineComments", 1},
{"\nline2", "TestLineComments", 2},
@ -604,14 +601,12 @@ func checkError(t *testing.T, src string, tok token.Token, pos int, err string)
}
type srcerr struct {
var errors = []struct {
src string
tok token.Token
pos int
err string
}
var errors = []srcerr{
}{
{"\"\"", token.STRING, 0, ""},
{"\"", token.STRING, 0, "string not terminated"},
{"/**/", token.COMMENT, 0, ""},