@@ -90,7 +90,7 @@ protected CatchClause parseCatchClause(Position startLoc) {
9090 if (this.eat(TokenType.parenL)) {
9191 param = this.parseBindingAtom();
9292 this.checkLVal(param, true, null);
93- if (this.eat(TokenType._if)) guard = this.parseExpression(false, null );
93+ if (this.eat(TokenType._if)) guard = this.parseExpression(false);
9494 this.expect(TokenType.parenR);
9595 } else if (!options.esnext()) {
9696 this.unexpected();
@@ -123,7 +123,7 @@ protected Statement parseVarStatement(Position startLoc, String kind) {
123123 }
124124
125125 @Override
126- protected Expression parseExprAtom(DestructuringErrors refDestructuringErrors ) {
126+ protected Expression parseExprAtom() {
127127 Position startLoc = this.startLoc;
128128 if (options.mozExtensions() && this.isContextual("let")) {
129129 this.next();
@@ -141,9 +141,9 @@ protected Expression parseExprAtom(DestructuringErrors refDestructuringErrors) {
141141 if (this.type == TokenType.comma
142142 || this.type == TokenType.bracketR
143143 || this.type == TokenType.ellipsis) {
144- elements = this.parseExprList(TokenType.bracketR, true, true, refDestructuringErrors );
144+ elements = this.parseExprList(TokenType.bracketR, true, true);
145145 } else {
146- Expression firstExpr = this.parseMaybeAssign(false, refDestructuringErrors, null);
146+ Expression firstExpr = this.parseMaybeAssign(false, null);
147147 // check whether this is a postfix array comprehension
148148 if (this.type == TokenType._for || this.type == TokenType._if) {
149149 ComprehensionExpression c = this.parseComprehension(startLoc, false, firstExpr);
@@ -154,7 +154,7 @@ protected Expression parseExprAtom(DestructuringErrors refDestructuringErrors) {
154154 elements = new ArrayList<Expression>();
155155 elements.add(firstExpr);
156156 elements.addAll(
157- this.parseExprList(TokenType.bracketR, true, true, refDestructuringErrors ));
157+ this.parseExprList(TokenType.bracketR, true, true));
158158 }
159159 }
160160 return this.finishNode(new ArrayExpression(new SourceLocation(startLoc), elements));
@@ -164,7 +164,7 @@ protected Expression parseExprAtom(DestructuringErrors refDestructuringErrors) {
164164 Identifier buildinName = this.parseIdent(true);
165165 Identifier name = this.finishNode(new Identifier(new SourceLocation(startLoc), "%" + buildinName.getName()));
166166 this.expect(TokenType.parenL);
167- List<Expression> args = this.parseExprList(TokenType.parenR, false, false, null );
167+ List<Expression> args = this.parseExprList(TokenType.parenR, false, false);
168168 CallExpression node =
169169 new CallExpression(
170170 new SourceLocation(startLoc), name, new ArrayList<>(), args, false, false);
@@ -184,7 +184,7 @@ protected Expression parseExprAtom(DestructuringErrors refDestructuringErrors) {
184184 }
185185 return attr;
186186 } else {
187- return super.parseExprAtom(refDestructuringErrors );
187+ return super.parseExprAtom();
188188 }
189189 }
190190
@@ -197,7 +197,7 @@ protected Node parseLetExpression(Position startLoc, boolean maybeStatement) {
197197 if (this.type == TokenType.braceL) {
198198 if (!maybeStatement) {
199199 // must be the start of an object literal
200- Expression body = this.parseObj(false, null );
200+ Expression body = this.parseObj(false);
201201 return this.finishNode(
202202 new LetExpression(new SourceLocation(startLoc), decl.getDeclarations(), body));
203203 }
@@ -212,7 +212,7 @@ protected Node parseLetExpression(Position startLoc, boolean maybeStatement) {
212212 return this.finishNode(
213213 new LetStatement(new SourceLocation(startLoc), decl.getDeclarations(), body));
214214 } else {
215- Expression body = this.parseExpression(false, null );
215+ Expression body = this.parseExpression(false);
216216 return this.finishNode(
217217 new LetExpression(new SourceLocation(startLoc), decl.getDeclarations(), body));
218218 }
@@ -283,13 +283,12 @@ private boolean eatDoubleColon() {
283283
284284 // accept `yield` in non-generator functions
285285 @Override
286- protected Expression parseMaybeAssign(
287- boolean noIn, DestructuringErrors refDestructuringErrors, AfterLeftParse afterLeftParse) {
286+ protected Expression parseMaybeAssign(boolean noIn, AfterLeftParse afterLeftParse) {
288287 if (options.mozExtensions() && isContextual("yield")) {
289288 if (!this.inFunction) this.raise(this.startLoc, "Yield not in function");
290289 return this.parseYield();
291290 }
292- return super.parseMaybeAssign(noIn, refDestructuringErrors, afterLeftParse);
291+ return super.parseMaybeAssign(noIn, afterLeftParse);
293292 }
294293
295294 // add parsing of comprehensions
@@ -309,12 +308,12 @@ protected ComprehensionExpression parseComprehension(
309308 } else {
310309 this.expect(TokenType._in);
311310 }
312- Expression right = this.parseExpression(false, null );
311+ Expression right = this.parseExpression(false);
313312 this.expect(TokenType.parenR);
314313 blocks.add(this.finishNode(new ComprehensionBlock(blockStart, (IPattern) left, right, of)));
315314 }
316315 Expression filter = this.eat(TokenType._if) ? this.parseParenExpression() : null;
317- if (body == null) body = this.parseExpression(false, null );
316+ if (body == null) body = this.parseExpression(false);
318317
319318 return new ComprehensionExpression(
320319 new SourceLocation(startLoc), body, blocks, filter, isGenerator);
@@ -353,13 +352,11 @@ protected Expression parseParenAndDistinguishExpression(boolean canBeArrow) {
353352
354353 @Override
355354 protected boolean parseParenthesisedExpression(
356- DestructuringErrors refDestructuringErrors,
357355 boolean allowTrailingComma,
358356 ParenthesisedExpressions parenExprs,
359357 boolean first) {
360358 boolean cont =
361- super.parseParenthesisedExpression(
362- refDestructuringErrors, allowTrailingComma, parenExprs, first);
359+ super.parseParenthesisedExpression(allowTrailingComma, parenExprs, first);
363360 if (options.mozExtensions() && parenExprs.exprList.size() == 1 && this.type == TokenType._for) {
364361 Expression body = parenExprs.exprList.remove(0);
365362 ComprehensionExpression c = parseComprehension(body.getLoc().getStart(), true, body);
@@ -399,7 +396,7 @@ protected Expression parseNew() {
399396 && options.mozExtensions()
400397 && !canInsertSemicolon()
401398 && this.type == TokenType.braceL) {
402- ((NewExpression) res).getArguments().add(this.parseObj(false, null ));
399+ ((NewExpression) res).getArguments().add(this.parseObj(false));
403400 res = this.finishNode(res);
404401 }
405402 return res;
@@ -465,7 +462,7 @@ protected Pair<Expression, Boolean> parseSubscript(
465462 if (options.e4x() && this.eat(TokenType.dot)) {
466463 SourceLocation start = new SourceLocation(startLoc);
467464 if (this.eat(TokenType.parenL)) {
468- Expression filter = parseExpression(false, null );
465+ Expression filter = parseExpression(false);
469466 this.expect(TokenType.parenR);
470467 return Pair.make(this.finishNode(new XMLFilterExpression(start, base, filter)), true);
471468 }
@@ -515,7 +512,7 @@ protected Expression parsePropertySelector(SourceLocation start) {
515512 */
516513 protected Expression parseAttributeIdentifier(SourceLocation start) {
517514 if (this.eat(TokenType.bracketL)) {
518- Expression idx = parseExpression(false, null );
515+ Expression idx = parseExpression(false);
519516 this.expect(TokenType.bracketR);
520517 return this.finishNode(new XMLAttributeSelector(start, idx, true));
521518 } else {
@@ -533,7 +530,7 @@ protected Expression parseDecoratorBody() {
533530 // followed by a right bracket, which will later be converted by
534531 // `decoratorToAttributeSelector` below
535532 List<Expression> elements = new ArrayList<>();
536- elements.add(parseExpression(false, null ));
533+ elements.add(parseExpression(false));
537534 this.expect(TokenType.bracketR);
538535 return this.finishNode(new ArrayExpression(start, elements));
539536 }
0 commit comments