Revert "fix up async/await"
This reverts commit f18f264a330258da521027cc4edd5852e26f8add.
This commit is contained in:
parent
b0bf126c22
commit
f35dad0980
13
acorn.js
13
acorn.js
@ -2075,7 +2075,7 @@
|
||||
retNode = finishNode(retNode, "AssignmentExpression");
|
||||
}
|
||||
else {
|
||||
unexpected();
|
||||
unexpected
|
||||
}
|
||||
semicolon();
|
||||
}
|
||||
@ -2649,8 +2649,6 @@
|
||||
}
|
||||
if (options.ecmaVersion >= 6) {
|
||||
isGenerator = eat(_star);
|
||||
prop.method = false;
|
||||
prop.shorthand = false;
|
||||
}
|
||||
|
||||
if (tokType === _name || tokType.keyword) {
|
||||
@ -2661,9 +2659,18 @@
|
||||
if (isAsync && isGenerator) {
|
||||
unexpected();
|
||||
}
|
||||
if (options.ecmaVersion >= 6) {
|
||||
prop.method = false;
|
||||
prop.shorthand = false;
|
||||
}
|
||||
parsePropertyName(prop);
|
||||
}
|
||||
else if (tokType === _colon) {
|
||||
// key could be "async"
|
||||
if (options.ecmaVersion >= 6) {
|
||||
prop.method = false;
|
||||
prop.shorthand = false;
|
||||
}
|
||||
isAsync = false;
|
||||
}
|
||||
else if (tokType === _bracketL) {
|
||||
|
||||
@ -14716,7 +14716,7 @@ test("var async; async = 10;", {
|
||||
locations: true
|
||||
});
|
||||
|
||||
test("var {a, async} = b;", {
|
||||
test("var {a, async} = b;" {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 19,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user