From 3d9a82e31be54ca6a48e47f4df9eaf6bca2c6977 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Fri, 19 Feb 2010 16:01:31 -0800 Subject: - 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 --- src/cmd/cgo/ast.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/cmd/cgo') 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") -- cgit v1.2.3