Chromium Code Reviews| Index: src/parsing/preparser.cc |
| diff --git a/src/parsing/preparser.cc b/src/parsing/preparser.cc |
| index d335c8bdcd29433337d1173c9e17b3a1e116a999..b48b947e80b508e532bdb547c44e51cf58cc4192 100644 |
| --- a/src/parsing/preparser.cc |
| +++ b/src/parsing/preparser.cc |
| @@ -38,8 +38,10 @@ void PreParserTraits::ReportMessageAt(int start_pos, int end_pos, |
| PreParserIdentifier PreParserTraits::GetSymbol(Scanner* scanner) { |
| - if (scanner->current_token() == Token::FUTURE_RESERVED_WORD) { |
| - return PreParserIdentifier::FutureReserved(); |
| + if (scanner->current_token() == Token::ENUM) { |
| + return PreParserIdentifier::Enum(); |
| + } else if (scanner->current_token() == Token::AWAIT) { |
| + return PreParserIdentifier::Await(); |
| } else if (scanner->current_token() == |
| Token::FUTURE_STRICT_RESERVED_WORD) { |
| return PreParserIdentifier::FutureStrictReserved(); |
| @@ -694,7 +696,6 @@ PreParser::Statement PreParser::ParseExpressionOrLabelledStatement(bool* ok) { |
| if (starts_with_identifier && expr.IsIdentifier() && peek() == Token::COLON) { |
| // Expression is a single identifier, and not, e.g., a parenthesized |
| // identifier. |
| - DCHECK(!expr.AsIdentifier().IsFutureReserved()); |
|
mike3
2016/02/23 19:29:44
I'm not convinced that removing this check outrigh
adamk
2016/02/23 22:37:15
"DCHECK" is the V8 equivalent of "assert": it's no
mike3
2016/02/24 16:20:54
Acknowledged.
|
| DCHECK(is_sloppy(language_mode()) || |
| !IsFutureStrictReserved(expr.AsIdentifier())); |
| Consume(Token::COLON); |