aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/ast/ast.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/ast/ast.go')
-rw-r--r--pkg/ast/ast.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/ast/ast.go b/pkg/ast/ast.go
index 9e87a1b81..454f28b37 100644
--- a/pkg/ast/ast.go
+++ b/pkg/ast/ast.go
@@ -24,6 +24,9 @@ type Node interface {
// If newPos is not zero, sets Pos of all nodes to newPos.
// If newPos is zero, Pos of nodes is left intact.
Clone(newPos Pos) Node
+ // Walk calls callback cb for all child nodes of this node.
+ // Note: it's not recursive. Use Recursive helper for recursive walk.
+ Walk(cb func(Node))
}
// Top-level AST nodes: