diff --git a/src/go/ast/walk.go b/src/go/ast/walk.go index 73ac38647a..d531f5e714 100644 --- a/src/go/ast/walk.go +++ b/src/go/ast/walk.go @@ -379,7 +379,8 @@ func (f inspector) Visit(node Node) Visitor { // Inspect traverses an AST in depth-first order: It starts by calling // f(node); node must not be nil. If f returns true, Inspect invokes f -// for all the non-nil children of node, recursively. +// recursively for each of the non-nil children of node, followed by a +// call of f(nil). // func Inspect(node Node, f func(Node) bool) { Walk(inspector(f), node)