Remove unused local variables.
This commit is contained in:
parent
e58f401b82
commit
1ca2115294
10
acorn.js
10
acorn.js
@ -2082,7 +2082,7 @@
|
||||
if (options.allowTrailingCommas && eat(_braceR)) break;
|
||||
} else first = false;
|
||||
|
||||
var prop = startNode(), kind, isGenerator;
|
||||
var prop = startNode(), isGenerator;
|
||||
if (options.ecmaVersion >= 6) {
|
||||
prop.method = false;
|
||||
prop.shorthand = false;
|
||||
@ -2091,19 +2091,19 @@
|
||||
parsePropertyName(prop);
|
||||
if (eat(_colon)) {
|
||||
prop.value = parseExpression(true);
|
||||
kind = prop.kind = "init";
|
||||
prop.kind = "init";
|
||||
} else if (options.ecmaVersion >= 6 && tokType === _parenL) {
|
||||
kind = prop.kind = "init";
|
||||
prop.kind = "init";
|
||||
prop.method = true;
|
||||
prop.value = parseMethod(isGenerator);
|
||||
} else if (options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" &&
|
||||
(prop.key.name === "get" || prop.key.name === "set")) {
|
||||
if (isGenerator) unexpected();
|
||||
kind = prop.kind = prop.key.name;
|
||||
prop.kind = prop.key.name;
|
||||
parsePropertyName(prop);
|
||||
prop.value = parseMethod(false);
|
||||
} else if (options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
|
||||
kind = prop.kind = "init";
|
||||
prop.kind = "init";
|
||||
prop.value = prop.key;
|
||||
prop.shorthand = true;
|
||||
} else unexpected();
|
||||
|
||||
@ -693,15 +693,14 @@
|
||||
while (!closes(tt.braceR, propIndent, line)) {
|
||||
var name = parsePropertyName();
|
||||
if (!name) { if (isDummy(parseExpression(true))) next(); eat(tt.comma); continue; }
|
||||
var prop = startNode(), isGetSet = false, kind;
|
||||
var prop = startNode();
|
||||
prop.key = name;
|
||||
if (eat(tt.colon)) {
|
||||
prop.value = parseExpression(true);
|
||||
kind = prop.kind = "init";
|
||||
prop.kind = "init";
|
||||
} else if (options.ecmaVersion >= 5 && prop.key.type === "Identifier" &&
|
||||
(prop.key.name === "get" || prop.key.name === "set")) {
|
||||
isGetSet = true;
|
||||
kind = prop.kind = prop.key.name;
|
||||
prop.kind = prop.key.name;
|
||||
prop.key = parsePropertyName() || dummyIdent();
|
||||
prop.value = parseFunction(startNode(), false);
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user