UNPKG

538 BJavaScriptView Raw
1var BinaryExpression = module.exports = function(operator, left, right) {
2 this.type = 'BinaryExpression',
3 this.operator = operator;
4 this.left = left;
5 this.right = right;
6 this.async = false;
7};
8
9BinaryExpression.prototype.normalize = function () {
10 this.left.normalize();
11 this.right.normalize();
12};
13
14BinaryExpression.prototype.transform = function (place) {
15 place = this.left.transform(place);
16 place = this.right.transform(place);
17 if (this.left.async || this.right.async) {
18 this.async = true;
19 }
20 return place;
21};