@@ -21,68 +21,68 @@ type BeforeAndAfterVisitor = v1.BeforeAndAfterVisitor
2121// Walk iterates the AST by calling the Visit function on the Visitor
2222// v for x before recursing.
2323// Deprecated: use GenericVisitor.Walk
24- func Walk (v Visitor , x interface {} ) {
24+ func Walk (v Visitor , x any ) {
2525 v1 .Walk (v , x )
2626}
2727
2828// WalkBeforeAndAfter iterates the AST by calling the Visit function on the
2929// Visitor v for x before recursing.
3030// Deprecated: use GenericVisitor.Walk
31- func WalkBeforeAndAfter (v BeforeAndAfterVisitor , x interface {} ) {
31+ func WalkBeforeAndAfter (v BeforeAndAfterVisitor , x any ) {
3232 v1 .WalkBeforeAndAfter (v , x )
3333}
3434
3535// WalkVars calls the function f on all vars under x. If the function f
3636// returns true, AST nodes under the last node will not be visited.
37- func WalkVars (x interface {} , f func (Var ) bool ) {
37+ func WalkVars (x any , f func (Var ) bool ) {
3838 v1 .WalkVars (x , f )
3939}
4040
4141// WalkClosures calls the function f on all closures under x. If the function f
4242// returns true, AST nodes under the last node will not be visited.
43- func WalkClosures (x interface {} , f func (interface {} ) bool ) {
43+ func WalkClosures (x any , f func (any ) bool ) {
4444 v1 .WalkClosures (x , f )
4545}
4646
4747// WalkRefs calls the function f on all references under x. If the function f
4848// returns true, AST nodes under the last node will not be visited.
49- func WalkRefs (x interface {} , f func (Ref ) bool ) {
49+ func WalkRefs (x any , f func (Ref ) bool ) {
5050 v1 .WalkRefs (x , f )
5151}
5252
5353// WalkTerms calls the function f on all terms under x. If the function f
5454// returns true, AST nodes under the last node will not be visited.
55- func WalkTerms (x interface {} , f func (* Term ) bool ) {
55+ func WalkTerms (x any , f func (* Term ) bool ) {
5656 v1 .WalkTerms (x , f )
5757}
5858
5959// WalkWiths calls the function f on all with modifiers under x. If the function f
6060// returns true, AST nodes under the last node will not be visited.
61- func WalkWiths (x interface {} , f func (* With ) bool ) {
61+ func WalkWiths (x any , f func (* With ) bool ) {
6262 v1 .WalkWiths (x , f )
6363}
6464
6565// WalkExprs calls the function f on all expressions under x. If the function f
6666// returns true, AST nodes under the last node will not be visited.
67- func WalkExprs (x interface {} , f func (* Expr ) bool ) {
67+ func WalkExprs (x any , f func (* Expr ) bool ) {
6868 v1 .WalkExprs (x , f )
6969}
7070
7171// WalkBodies calls the function f on all bodies under x. If the function f
7272// returns true, AST nodes under the last node will not be visited.
73- func WalkBodies (x interface {} , f func (Body ) bool ) {
73+ func WalkBodies (x any , f func (Body ) bool ) {
7474 v1 .WalkBodies (x , f )
7575}
7676
7777// WalkRules calls the function f on all rules under x. If the function f
7878// returns true, AST nodes under the last node will not be visited.
79- func WalkRules (x interface {} , f func (* Rule ) bool ) {
79+ func WalkRules (x any , f func (* Rule ) bool ) {
8080 v1 .WalkRules (x , f )
8181}
8282
8383// WalkNodes calls the function f on all nodes under x. If the function f
8484// returns true, AST nodes under the last node will not be visited.
85- func WalkNodes (x interface {} , f func (Node ) bool ) {
85+ func WalkNodes (x any , f func (Node ) bool ) {
8686 v1 .WalkNodes (x , f )
8787}
8888
@@ -93,7 +93,7 @@ type GenericVisitor = v1.GenericVisitor
9393
9494// NewGenericVisitor returns a new GenericVisitor that will invoke the function
9595// f on AST nodes.
96- func NewGenericVisitor (f func (x interface {} ) bool ) * GenericVisitor {
96+ func NewGenericVisitor (f func (x any ) bool ) * GenericVisitor {
9797 return v1 .NewGenericVisitor (f )
9898}
9999
@@ -105,7 +105,7 @@ type BeforeAfterVisitor = v1.BeforeAfterVisitor
105105
106106// NewBeforeAfterVisitor returns a new BeforeAndAfterVisitor that
107107// will invoke the functions before and after AST nodes.
108- func NewBeforeAfterVisitor (before func (x interface {} ) bool , after func (x interface {} )) * BeforeAfterVisitor {
108+ func NewBeforeAfterVisitor (before func (x any ) bool , after func (x any )) * BeforeAfterVisitor {
109109 return v1 .NewBeforeAfterVisitor (before , after )
110110}
111111
0 commit comments