UNPKG

606 BJavaScriptView Raw
1var ConditionalExpression = module.exports = function(test, consequent, alternate) {
2 this.type = 'ConditionalExpression';
3 this.test = test;
4 this.consequent = consequent;
5 this.alternate = alternate;
6 this.async = false;
7};
8
9ConditionalExpression.prototype.normalize = function (place) {
10 this.test.normalize(place);
11 this.consequent.normalize(place);
12 this.alternate.normalize(place);
13};
14
15ConditionalExpression.prototype.transform = function (place) {
16 place = this.test.transform(place);
17 place = this.consequent.transform(place);
18 place = this.alternate.transform(place);
19 return place;
20}