Skip to content

Commit 70aedf5

Browse files
author
Joyce Chen
committed
Add bitwise AND, OR for binary expressions.
1 parent f232c58 commit 70aedf5

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

lib/node/valueExpression.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ var ValueExpressionMixin = module.exports = function() {
7272
modulo : binaryMethod('%'),
7373
leftShift : binaryMethod('<<'),
7474
rightShift : binaryMethod('>>'),
75+
bitwiseAnd : binaryMethod('&'),
76+
bitwiseOr : binaryMethod('|'),
7577
like : binaryMethod('LIKE'),
7678
notLike : binaryMethod('NOT LIKE'),
7779
in : binaryMethod('IN'),

test/binary-clause-tests.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ test('operators', function() {
2727
assert.equal(Foo.baz.multiply(1).operator, '*');
2828
assert.equal(Foo.baz.leftShift(1).operator, '<<');
2929
assert.equal(Foo.baz.rightShift(1).operator, '>>');
30+
assert.equal(Foo.baz.bitwiseAnd(1).operator, '&');
31+
assert.equal(Foo.baz.bitwiseOr(1).operator, '|');
3032
assert.equal(Foo.baz.divide(1).operator, '/');
3133
assert.equal(Foo.baz.modulo(1).operator, '%');
3234
});

0 commit comments

Comments
 (0)