parseMaybeUnary() doesn't need parameter @noIn
This commit is contained in:
parent
567f3ca32a
commit
16b54e0698
8
acorn.js
8
acorn.js
@ -1443,7 +1443,7 @@
|
|||||||
// Start the precedence parser.
|
// Start the precedence parser.
|
||||||
|
|
||||||
function parseExprOps(noIn) {
|
function parseExprOps(noIn) {
|
||||||
return parseExprOp(parseMaybeUnary(noIn), -1, noIn);
|
return parseExprOp(parseMaybeUnary(), -1, noIn);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse binary operators with the operator precedence parsing
|
// Parse binary operators with the operator precedence parsing
|
||||||
@ -1460,7 +1460,7 @@
|
|||||||
node.left = left;
|
node.left = left;
|
||||||
node.operator = tokVal;
|
node.operator = tokVal;
|
||||||
next();
|
next();
|
||||||
node.right = parseExprOp(parseMaybeUnary(noIn), prec, noIn);
|
node.right = parseExprOp(parseMaybeUnary(), prec, noIn);
|
||||||
var node = finishNode(node, /&&|\|\|/.test(node.operator) ? "LogicalExpression" : "BinaryExpression");
|
var node = finishNode(node, /&&|\|\|/.test(node.operator) ? "LogicalExpression" : "BinaryExpression");
|
||||||
return parseExprOp(node, minPrec, noIn);
|
return parseExprOp(node, minPrec, noIn);
|
||||||
}
|
}
|
||||||
@ -1470,13 +1470,13 @@
|
|||||||
|
|
||||||
// Parse unary operators, both prefix and postfix.
|
// Parse unary operators, both prefix and postfix.
|
||||||
|
|
||||||
function parseMaybeUnary(noIn) {
|
function parseMaybeUnary() {
|
||||||
if (tokType.prefix) {
|
if (tokType.prefix) {
|
||||||
var node = startNode(), update = tokType.isUpdate;
|
var node = startNode(), update = tokType.isUpdate;
|
||||||
node.operator = tokVal;
|
node.operator = tokVal;
|
||||||
node.prefix = true;
|
node.prefix = true;
|
||||||
next();
|
next();
|
||||||
node.argument = parseMaybeUnary(noIn);
|
node.argument = parseMaybeUnary();
|
||||||
if (update) checkLVal(node.argument);
|
if (update) checkLVal(node.argument);
|
||||||
else if (strict && node.operator === "delete" &&
|
else if (strict && node.operator === "delete" &&
|
||||||
node.argument.type === "Identifier")
|
node.argument.type === "Identifier")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user