From f830892ab8d9fc6410af758b0f8c5d9b8910c251 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Thu, 19 Mar 2015 03:17:28 +1100 Subject: [PATCH] fix modules generation logic and remove dead node types --- acorn.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acorn.js b/acorn.js index 9c5c8c6dcc..68b94cf405 100644 --- a/acorn.js +++ b/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") {