diff options
author | Andrew Gerrand <adg@golang.org> | 2010-03-23 09:00:47 +1100 |
---|---|---|
committer | Andrew Gerrand <adg@golang.org> | 2010-03-23 09:00:47 +1100 |
commit | 51a7f1c9d6c997caa9e4894ace63692d6203b12f (patch) | |
tree | e80b7dd219be3ba5c34fa80e1122f2e0205d01af | |
parent | 2e5fe5a14c8b9578064c686a2b62328c84136f48 (diff) | |
download | go-51a7f1c9d6c997caa9e4894ace63692d6203b12f.tar.gz go-51a7f1c9d6c997caa9e4894ace63692d6203b12f.zip |
ast/printer: support for printing ast.Spec nodes
R=gri
CC=golang-dev
https://golang.org/cl/682041
-rw-r--r-- | src/pkg/go/printer/printer.go | 3 |
1 files changed, 3 insertions, 0 deletions
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 |