]> Cypherpunks repositories - gostls13.git/commitdiff
go/ast: fix ast.Inspect doc string
authorRobert Griesemer <gri@golang.org>
Thu, 2 Apr 2015 00:48:08 +0000 (17:48 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 2 Apr 2015 03:51:22 +0000 (03:51 +0000)
Fixes #10243.

Change-Id: I06ac53628980853faecbf1a57ff71b88098d65f2
Reviewed-on: https://go-review.googlesource.com/8382
Reviewed-by: Minux Ma <minux@golang.org>
src/go/ast/walk.go

index 73ac38647a23f2d6b7417428fb61659b2efe512d..d531f5e7144322b4a494b9952b1b456b71e83460 100644 (file)
@@ -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)