Merge pull request #3190 from hzoo/remove-await-star

Remove await* from babel-generator, add parsing error to babylon - (fixes T6688)
This commit is contained in:
Amjad Masad 2015-12-22 22:57:23 -08:00
commit 1d82e48d36
12 changed files with 19 additions and 19 deletions

View File

@ -968,7 +968,9 @@ pp.parseAwait = function (node) {
if (this.isLineTerminator()) {
this.unexpected();
}
node.all = this.eat(tt.star);
if (this.match(tt.star)) {
this.raise(node.start, "await* has been removed from the async functions proposal. Use Promise.all() instead.")
}
node.argument = this.parseMaybeUnary();
return this.finishNode(node, "AwaitExpression");
};

View File

@ -282,7 +282,6 @@
"column": 38
}
},
"all": false,
"argument": {
"type": "CallExpression",
"start": 97,
@ -380,4 +379,4 @@
],
"directives": []
}
}
}

View File

@ -297,7 +297,6 @@
"column": 38
}
},
"all": false,
"argument": {
"type": "CallExpression",
"start": 99,
@ -398,4 +397,4 @@
],
"directives": []
}
}
}

View File

@ -0,0 +1,3 @@
async function bar() {
await* foo();
}

View File

@ -0,0 +1,4 @@
{
"plugins": ["asyncFunctions"],
"throws": "await* has been removed from the async functions proposal. Use Promise.all() instead. (2:2)"
}

View File

@ -122,7 +122,6 @@
"column": 43
}
},
"all": false,
"argument": {
"type": "Identifier",
"start": 36,
@ -146,4 +145,4 @@
}
]
}
}
}

View File

@ -170,7 +170,6 @@
"column": 47
}
},
"all": false,
"argument": {
"type": "Identifier",
"start": 46,
@ -204,4 +203,4 @@
],
"directives": []
}
}
}

View File

@ -152,7 +152,6 @@
"column": 49
}
},
"all": false,
"argument": {
"type": "Identifier",
"start": 42,
@ -180,4 +179,4 @@
}
]
}
}
}

View File

@ -241,7 +241,6 @@
"column": 50
}
},
"all": false,
"argument": {
"type": "Identifier",
"start": 43,
@ -273,4 +272,4 @@
],
"directives": []
}
}
}

View File

@ -172,7 +172,6 @@
"column": 46
}
},
"all": false,
"argument": {
"type": "Identifier",
"start": 39,
@ -201,4 +200,4 @@
],
"directives": []
}
}
}

View File

@ -139,7 +139,6 @@
"column": 35
}
},
"all": false,
"argument": {
"type": "Identifier",
"start": 28,
@ -163,4 +162,4 @@
}
]
}
}
}

View File

@ -152,7 +152,6 @@
"column": 41
}
},
"all": false,
"argument": {
"type": "Identifier",
"start": 34,
@ -179,4 +178,4 @@
}
]
}
}
}