Fixes #10243.
Change-Id: I06ac53628980853faecbf1a57ff71b88098d65f2
Reviewed-on: https://go-review.googlesource.com/8382
Reviewed-by: Minux Ma <minux@golang.org>
// 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)