no line terminator after contextual async keyword

This commit is contained in:
Sebastian McKenzie 2015-01-04 20:35:51 +11:00
parent 8dad17b675
commit 1eeb505bf4
2 changed files with 8 additions and 1 deletions

View File

@ -2609,6 +2609,13 @@
// normal functions
if (tokType === _function) {
if (isStatement) {
// no line terminator after `async` contextual keyword
if (tokType === _semi || canInsertSemicolon()) {
return id;
}
}
next();
return parseFunction(node, isStatement, true);
}

View File

@ -2,7 +2,7 @@
"name": "acorn-6to5",
"description": "Acorn fork used by 6to5",
"main": "acorn.js",
"version": "0.11.1-8",
"version": "0.11.1-9",
"maintainers": [
{
"name": "Marijn Haverbeke",