fix modules generation logic and remove dead node types
This commit is contained in:
parent
7c84db45fd
commit
f830892ab8
4
acorn.js
4
acorn.js
@ -2624,7 +2624,7 @@
|
||||
if (this.afterTrailingComma(tt.braceR)) break;
|
||||
} else first = false;
|
||||
|
||||
var prop = this.startNode(), isGenerator, isAsync, start;
|
||||
var prop = this.startNode(), isGenerator = false, isAsync = false, start;
|
||||
if (this.options.features["es7.objectRestSpread"] && this.type === tt.ellipsis) {
|
||||
prop = this.parseSpread();
|
||||
prop.type = "SpreadProperty";
|
||||
@ -2813,7 +2813,7 @@
|
||||
while (!this.eat(tt.braceR)) {
|
||||
if (this.eat(tt.semi)) continue;
|
||||
var method = this.startNode();
|
||||
var isGenerator = this.eat(tt.star), isAsync;
|
||||
var isGenerator = this.eat(tt.star), isAsync = false;
|
||||
this.parsePropertyName(method);
|
||||
if (this.type !== tt.parenL && !method.computed && method.key.type === "Identifier" &&
|
||||
method.key.name === "static") {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user