Commit c77f0900 authored by Robert Griesemer's avatar Robert Griesemer

go/scanner: delete unnecessary type declarations

R=rsc, r2
CC=golang-dev
https://golang.org/cl/2735041
parent 5556f733
...@@ -427,14 +427,11 @@ func TestSemis(t *testing.T) { ...@@ -427,14 +427,11 @@ func TestSemis(t *testing.T) {
} }
type seg struct { var segments = []struct {
srcline string // a line of source text srcline string // a line of source text
filename string // filename for current token filename string // filename for current token
line int // line number 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 // exactly one token per line since the test consumes one token per segment
{" line1", "TestLineComments", 1}, {" line1", "TestLineComments", 1},
{"\nline2", "TestLineComments", 2}, {"\nline2", "TestLineComments", 2},
...@@ -604,14 +601,12 @@ func checkError(t *testing.T, src string, tok token.Token, pos int, err string) ...@@ -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 src string
tok token.Token tok token.Token
pos int pos int
err string err string
} }{
var errors = []srcerr{
{"\"\"", token.STRING, 0, ""}, {"\"\"", token.STRING, 0, ""},
{"\"", token.STRING, 0, "string not terminated"}, {"\"", token.STRING, 0, "string not terminated"},
{"/**/", token.COMMENT, 0, ""}, {"/**/", token.COMMENT, 0, ""},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment