diff options
author | Robert Griesemer <gri@golang.org> | 2010-02-19 16:01:31 -0800 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2010-02-19 16:01:31 -0800 |
commit | 3d9a82e31be54ca6a48e47f4df9eaf6bca2c6977 (patch) | |
tree | b120ff326ccaf133fe2d33eaf6c19eaf86abca06 /src/cmd/cgo | |
parent | 9c9748492d080a2e3f3c78686a2d8bf65f45ceb7 (diff) | |
download | golang-3d9a82e31be54ca6a48e47f4df9eaf6bca2c6977.tar.gz |
- removed exp/parser (support for old semicolon syntax)
- go/ast: removed StringList (not needed anymore)
- go/ast: changed import path and field list tag to a single string
- updated all dependencies
R=rsc
CC=golang-dev
http://codereview.appspot.com/217056
Diffstat (limited to 'src/cmd/cgo')
-rw-r--r-- | src/cmd/cgo/ast.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cmd/cgo/ast.go b/src/cmd/cgo/ast.go index f6142d135..2cc771e16 100644 --- a/src/cmd/cgo/ast.go +++ b/src/cmd/cgo/ast.go @@ -90,14 +90,14 @@ func openProg(name string, p *Prog) { ws := 0 for _, spec := range d.Specs { s, ok := spec.(*ast.ImportSpec) - if !ok || len(s.Path) != 1 || string(s.Path[0].Value) != `"C"` { + if !ok || string(s.Path.Value) != `"C"` { d.Specs[ws] = spec ws++ continue } sawC = true if s.Name != nil { - error(s.Path[0].Pos(), `cannot rename import "C"`) + error(s.Path.Pos(), `cannot rename import "C"`) } if s.Doc != nil { p.Preamble += doc.CommentText(s.Doc) + "\n" @@ -168,7 +168,6 @@ func walk(x interface{}, p *Prog, context string) { case *ast.Ident: case *ast.Ellipsis: case *ast.BasicLit: - case *ast.StringList: case *ast.FuncLit: walk(n.Type, p, "type") walk(n.Body, p, "stmt") |