no line terminator after contextual async keyword
This commit is contained in:
parent
8dad17b675
commit
1eeb505bf4
7
acorn.js
7
acorn.js
@ -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);
|
||||
}
|
||||
|
||||
@ -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",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user