From 51a7f1c9d6c997caa9e4894ace63692d6203b12f Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Tue, 23 Mar 2010 09:00:47 +1100 Subject: [PATCH] ast/printer: support for printing ast.Spec nodes R=gri CC=golang-dev https://golang.org/cl/682041 --- src/pkg/go/printer/printer.go | 3 +++ 1 file changed, 3 insertions(+) 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