add RestProperty node
This commit is contained in:
parent
eae82799e6
commit
bcab30e606
@ -635,7 +635,7 @@ pp.parseObj = function (isPattern, refShorthandDefaultPos) {
|
||||
}
|
||||
if (this.hasFeature("objectRestSpread") && this.match(tt.ellipsis)) {
|
||||
prop = this.parseSpread();
|
||||
prop.type = "SpreadProperty";
|
||||
prop.type = isPattern ? "RestProperty" : "SpreadProperty";
|
||||
node.properties.push(prop);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -202,7 +202,7 @@ pp.checkLVal = function (expr, isBinding, checkClashes) {
|
||||
this.checkLVal(expr.left, isBinding, checkClashes);
|
||||
break;
|
||||
|
||||
case "SpreadProperty":
|
||||
case "RestProperty":
|
||||
case "RestElement":
|
||||
this.checkLVal(expr.argument, isBinding, checkClashes);
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user