]> Cypherpunks repositories - gostls13.git/commitdiff
ast/printer: support for printing ast.Spec nodes
authorAndrew Gerrand <adg@golang.org>
Mon, 22 Mar 2010 22:00:47 +0000 (09:00 +1100)
committerAndrew Gerrand <adg@golang.org>
Mon, 22 Mar 2010 22:00:47 +0000 (09:00 +1100)
R=gri
CC=golang-dev
https://golang.org/cl/682041

src/pkg/go/printer/printer.go

index 3bb51b466f6c50f8b3326ab89d34acdfeda109ff..4c530d2490a1cf78a602ac08d2da6a31a23e5cb4 100644 (file)
@@ -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