Adjusted Object Rest/Spread syntax handling to the latest spec (#670)
This commit is contained in:
committed by
Brian Ng
parent
5df1139567
commit
5d83e2692f
@@ -1118,8 +1118,9 @@ export default class ExpressionParser extends LValParser {
|
||||
|
||||
if (this.hasPlugin("objectRestSpread") && this.match(tt.ellipsis)) {
|
||||
prop = this.parseSpread(isPattern ? { start: 0 } : undefined);
|
||||
prop.type = isPattern ? "RestElement" : "SpreadElement";
|
||||
if (isPattern) this.toAssignable(prop.argument, true, "object pattern");
|
||||
if (isPattern) {
|
||||
this.toAssignable(prop, true, "object pattern");
|
||||
}
|
||||
node.properties.push(prop);
|
||||
if (isPattern) {
|
||||
const position = this.state.start;
|
||||
|
||||
Reference in New Issue
Block a user