Skip to content

Commit

Permalink
Merge pull request #135 from jwillemsen/jwi-xor
Browse files Browse the repository at this point in the history
Support xor (^)
  • Loading branch information
jwillemsen authored Jul 15, 2023
2 parents 86f4c59 + 79a0213 commit d1c10a2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/ridlbe/ruby/walker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,8 @@ def operation_to_s(exp)
s = '-' + expression_to_s(op[0])
when Expression::Operation::UnaryNot
s = '~' + expression_to_s(op[0])
when Expression::Operation::Xor
s = expression_to_s(op[0]) + ' ^ ' + expression_to_s(op[1])
when Expression::Operation::Or
s = expression_to_s(op[0]) + ' | ' + expression_to_s(op[1])
when Expression::Operation::And
Expand Down Expand Up @@ -1538,6 +1540,8 @@ def operation_to_s(exp)
s = '-' + expression_to_s(op[0])
when Expression::UnaryNot
s = '~' + expression_to_s(op[0])
when Expression::Xor
s = expression_to_s(op[0]) + ' ^ ' + expression_to_s(op[1])
when Expression::Or
s = expression_to_s(op[0]) + ' | ' + expression_to_s(op[1])
when Expression::And
Expand Down

0 comments on commit d1c10a2

Please sign in to comment.