]> Cypherpunks repositories - gostls13.git/commit
go/ast Fprint: handle cycles in AST
authorRobert Griesemer <gri@golang.org>
Thu, 19 Aug 2010 23:03:02 +0000 (16:03 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 19 Aug 2010 23:03:02 +0000 (16:03 -0700)
commit1a667f52d87a9fec1b3406bb2697b790dff64768
tree6a41d3d31e51eba7e7e30790f57d271c4fab1fba
parent9d3eb29a29100e37615241ffe3f3e5e525f4649d
go/ast Fprint: handle cycles in AST

Augmented ASTs may contain cycles. Keep
track of already printed objects and refer
to them with a line number instead of
printing them again.

R=rsc
CC=golang-dev
https://golang.org/cl/1998042
src/pkg/go/ast/print.go