From aade6827e73439d7294ba8af300de8035eec08d5 Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Tue, 23 Mar 2010 09:00:47 +1100 Subject: ast/printer: support for printing ast.Spec nodes R=gri CC=golang-dev http://codereview.appspot.com/682041 --- src/pkg/go/printer/printer.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/pkg/go/printer/printer.go b/src/pkg/go/printer/printer.go index 3bb51b466..4c530d249 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 -- cgit v1.2.3