| Index: src/parsing/parser-base.h
|
| diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h
|
| index d8705a654fd535d95fbe5fdcea017852e9241f40..0a9175e9ce81aa7afe0165f070bdeec5792765ea 100644
|
| --- a/src/parsing/parser-base.h
|
| +++ b/src/parsing/parser-base.h
|
| @@ -216,7 +216,6 @@ class ParserBase {
|
| allow_harmony_do_expressions_(false),
|
| allow_harmony_function_sent_(false),
|
| allow_harmony_restrictive_generators_(false),
|
| - allow_harmony_trailing_commas_(false),
|
| allow_harmony_class_fields_(false),
|
| allow_harmony_object_spread_(false) {}
|
|
|
| @@ -229,7 +228,6 @@ class ParserBase {
|
| ALLOW_ACCESSORS(harmony_do_expressions);
|
| ALLOW_ACCESSORS(harmony_function_sent);
|
| ALLOW_ACCESSORS(harmony_restrictive_generators);
|
| - ALLOW_ACCESSORS(harmony_trailing_commas);
|
| ALLOW_ACCESSORS(harmony_class_fields);
|
| ALLOW_ACCESSORS(harmony_object_spread);
|
|
|
| @@ -1454,7 +1452,6 @@ class ParserBase {
|
| bool allow_harmony_do_expressions_;
|
| bool allow_harmony_function_sent_;
|
| bool allow_harmony_restrictive_generators_;
|
| - bool allow_harmony_trailing_commas_;
|
| bool allow_harmony_class_fields_;
|
| bool allow_harmony_object_spread_;
|
|
|
| @@ -1908,8 +1905,7 @@ ParserBase<Impl>::ParseExpressionCoverGrammar(bool accept_IN, bool* ok) {
|
| scanner()->location(), MessageTemplate::kParamAfterRest);
|
| }
|
|
|
| - if (allow_harmony_trailing_commas() && peek() == Token::RPAREN &&
|
| - PeekAhead() == Token::ARROW) {
|
| + if (peek() == Token::RPAREN && PeekAhead() == Token::ARROW) {
|
| // a trailing comma is allowed at the end of an arrow parameter list
|
| break;
|
| }
|
| @@ -2616,7 +2612,7 @@ typename ParserBase<Impl>::ExpressionListT ParserBase<Impl>::ParseArguments(
|
| done = (peek() != Token::COMMA);
|
| if (!done) {
|
| Next();
|
| - if (allow_harmony_trailing_commas() && peek() == Token::RPAREN) {
|
| + if (peek() == Token::RPAREN) {
|
| // allow trailing comma
|
| done = true;
|
| }
|
| @@ -3552,7 +3548,7 @@ void ParserBase<Impl>::ParseFormalParameterList(FormalParametersT* parameters,
|
| break;
|
| }
|
| if (!Check(Token::COMMA)) break;
|
| - if (allow_harmony_trailing_commas() && peek() == Token::RPAREN) {
|
| + if (peek() == Token::RPAREN) {
|
| // allow the trailing comma
|
| break;
|
| }
|
|
|