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 | aade6827e73439d7294ba8af300de8035eec08d5 (patch) | |
tree | bcf336657f1ab3268ad2224f2e84b1755e75a703 /src/pkg/go | |
parent | da9aa35fe1c0d778f000bc79d0bfc386b13f959e (diff) | |
download | golang-aade6827e73439d7294ba8af300de8035eec08d5.tar.gz |
ast/printer: support for printing ast.Spec nodes
R=gri
CC=golang-dev
http://codereview.appspot.com/682041
Diffstat (limited to 'src/pkg/go')
-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 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 |