1 | var CatchClause = module.exports = function(param, guard, body) {
|
2 | this.type = 'CatchClause';
|
3 | this.param = param;
|
4 | this.guard = guard;
|
5 | this.body = body;
|
6 | this.async = false;
|
7 | };
|
8 |
|
9 | CatchClause.prototype.normalize = function (place) {
|
10 | this.param.normalize();
|
11 | this.body.normalize();
|
12 | };
|
13 |
|
14 | CatchClause.prototype.transform = function (place) {
|
15 | var newPlace = this.body.transform(place);
|
16 | if (this.body.async) {
|
17 | this.async = true;
|
18 | return newPlace;
|
19 | }
|
20 | return place;
|
21 | };
|