style nits

This commit is contained in:
Sebastian McKenzie 2015-08-05 21:45:22 +01:00
parent 7e80cac728
commit ef6ecbefaf

View File

@ -143,8 +143,11 @@ pp.parseMaybeConditional = function (noIn, refShorthandDefaultPos) {
pp.parseExprOps = function (noIn, refShorthandDefaultPos) { pp.parseExprOps = function (noIn, refShorthandDefaultPos) {
let startPos = this.state.start, startLoc = this.state.startLoc; let startPos = this.state.start, startLoc = this.state.startLoc;
let expr = this.parseMaybeUnary(refShorthandDefaultPos); let expr = this.parseMaybeUnary(refShorthandDefaultPos);
if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; if (refShorthandDefaultPos && refShorthandDefaultPos.start) {
return this.parseExprOp(expr, startPos, startLoc, -1, noIn); return expr;
} else {
return this.parseExprOp(expr, startPos, startLoc, -1, noIn);
}
}; };
// Parse binary operators with the operator precedence parsing // Parse binary operators with the operator precedence parsing
@ -188,6 +191,7 @@ pp.parseMaybeUnary = function (refShorthandDefaultPos) {
} }
return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
} }
let startPos = this.state.start, startLoc = this.state.startLoc; let startPos = this.state.start, startLoc = this.state.startLoc;
let expr = this.parseExprSubscripts(refShorthandDefaultPos); let expr = this.parseExprSubscripts(refShorthandDefaultPos);
if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
@ -311,7 +315,6 @@ pp.parseExprAtom = function (refShorthandDefaultPos) {
node = this.startNode(); node = this.startNode();
let id = this.parseIdent(true); let id = this.parseIdent(true);
//
if (this.options.features["es7.asyncFunctions"]) { if (this.options.features["es7.asyncFunctions"]) {
if (id.name === "await") { if (id.name === "await") {
if (this.inAsync) return this.parseAwait(node); if (this.inAsync) return this.parseAwait(node);