File tree 2 files changed +16
-0
lines changed 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,11 @@ def visit_alias(node)
65
65
node . copy ( left : visit ( node . left ) , right : visit ( node . right ) )
66
66
end
67
67
68
+ # Visit a AndNode node.
69
+ def visit_and ( node )
70
+ node . copy ( left : visit ( node . left ) , right : visit ( node . right ) )
71
+ end
72
+
68
73
# Visit a ARef node.
69
74
def visit_aref ( node )
70
75
node . copy ( index : visit ( node . index ) )
Original file line number Diff line number Diff line change @@ -9,6 +9,17 @@ def initialize(q)
9
9
@q = q
10
10
end
11
11
12
+ # This is here because we need to make sure the operator is cast to a string
13
+ # before we print it out.
14
+ def visit_and ( node )
15
+ node ( node , "and" ) do
16
+ field ( "left" , node . left )
17
+ text ( "operator" , node . operator . to_s )
18
+ field ( "right" , node . right )
19
+ comments ( node )
20
+ end
21
+ end
22
+
12
23
# This is here because we need to make sure the operator is cast to a string
13
24
# before we print it out.
14
25
def visit_binary ( node )
You can’t perform that action at this time.
0 commit comments