mirror of
https://github.com/golang/go
synced 2024-11-24 17:50:15 -07:00
ast/printer: support for printing ast.Spec nodes
R=gri CC=golang-dev https://golang.org/cl/682041
This commit is contained in:
parent
2e5fe5a14c
commit
51a7f1c9d6
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user