diff options
author | Alan Donovan <adonovan@google.com> | 2014-03-27 12:50:26 -0400 |
---|---|---|
committer | Alan Donovan <adonovan@google.com> | 2014-03-27 12:50:26 -0400 |
commit | 2414677bb9cf78f65fa5dba8418121bb2765bc78 (patch) | |
tree | 6f116a94040d497905d93ae1cd4d614e07e65efb /go/ssa/ssautil/switch_test.go | |
parent | 8b161c33a96c6a1bdbe702094d399777cdf7b0f8 (diff) | |
download | golang-x-tools-2414677bb9cf78f65fa5dba8418121bb2765bc78.tar.gz |
go.tools/go/loader: add Config.ParserMode configuration parameter.
Existing tools use the default value of zero; their behaviour is unchanged.
(*Config).ParseFile is used only from tests.
LGTM=crawshaw, rsc, gri
R=crawshaw, gri, rsc
CC=golang-codereviews
https://golang.org/cl/79290044
Diffstat (limited to 'go/ssa/ssautil/switch_test.go')
-rw-r--r-- | go/ssa/ssautil/switch_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/go/ssa/ssautil/switch_test.go b/go/ssa/ssautil/switch_test.go index a68f4644e..86d5bfb26 100644 --- a/go/ssa/ssautil/switch_test.go +++ b/go/ssa/ssautil/switch_test.go @@ -15,8 +15,8 @@ import ( ) func TestSwitches(t *testing.T) { - var conf loader.Config - f, err := conf.ParseFile("testdata/switches.go", nil, parser.ParseComments) + conf := loader.Config{ParserMode: parser.ParseComments} + f, err := conf.ParseFile("testdata/switches.go", nil) if err != nil { t.Error(err) return |