From: Andrew Gerrand Date: Mon, 22 Mar 2010 22:00:47 +0000 (+1100) Subject: ast/printer: support for printing ast.Spec nodes X-Git-Tag: weekly.2010-03-22~2 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=51a7f1c9d6c997caa9e4894ace63692d6203b12f;p=gostls13.git ast/printer: support for printing ast.Spec nodes R=gri CC=golang-dev https://golang.org/cl/682041 --- diff --git a/src/pkg/go/printer/printer.go b/src/pkg/go/printer/printer.go index 3bb51b466f..4c530d2490 100644 --- a/src/pkg/go/printer/printer.go +++ b/src/pkg/go/printer/printer.go @@ -1018,6 +1018,9 @@ func (cfg *Config) Fprint(output io.Writer, node interface{}) (int, os.Error) { case ast.Decl: p.useNodeComments = true p.decl(n, atTop, ignoreMultiLine) + case ast.Spec: + p.useNodeComments = true + p.spec(n, 1, atTop, false, ignoreMultiLine) case *ast.File: p.comments = n.Comments p.useNodeComments = n.Comments == nil