Inspector represents a function-based AST visitor for simplified traversal. Inspector is a function type that can be used to traverse the AST without creating a custom visitor type. It's a convenience wrapper around the Visitor interface for simple use cases. The function receives each node and re
func(Node) bool
| 205 | // |
| 206 | // See also: Inspect() for a more convenient function form |
| 207 | type Inspector func(Node) bool |
| 208 | |
| 209 | // Visit implements the Visitor interface for Inspector. |
| 210 | // |