Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/parser.cc

Issue 1429983002: [es6] early error when Identifier is an escaped reserved word (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/messages.h ('k') | src/preparser.h » ('j') | src/preparser.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/parser.h" 5 #include "src/parser.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/ast.h" 8 #include "src/ast.h"
9 #include "src/ast-literal-reindexer.h" 9 #include "src/ast-literal-reindexer.h"
10 #include "src/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1418 return ParseVariableStatement(kStatementListItem, NULL, ok); 1418 return ParseVariableStatement(kStatementListItem, NULL, ok);
1419 } 1419 }
1420 break; 1420 break;
1421 case Token::VAR: 1421 case Token::VAR:
1422 return ParseVariableStatement(kStatementListItem, NULL, ok); 1422 return ParseVariableStatement(kStatementListItem, NULL, ok);
1423 case Token::LET: 1423 case Token::LET:
1424 if (IsNextLetKeyword()) { 1424 if (IsNextLetKeyword()) {
1425 return ParseVariableStatement(kStatementListItem, NULL, ok); 1425 return ParseVariableStatement(kStatementListItem, NULL, ok);
1426 } 1426 }
1427 break; 1427 break;
1428 case Token::IDENTIFIER:
1429 CheckNextEscapedKeyword(ok);
adamk 2015/11/03 23:00:57 You can CHECK_OK, and then please break.
caitp (gmail) 2015/11/04 04:49:24 CHECK_OK means moving the macro definition here, b
1430 if (!*ok) return nullptr;
1428 default: 1431 default:
1429 break; 1432 break;
1430 } 1433 }
1431 return ParseStatement(NULL, ok); 1434 return ParseStatement(NULL, ok);
1432 } 1435 }
1433 1436
1434 1437
1435 Statement* Parser::ParseModuleItem(bool* ok) { 1438 Statement* Parser::ParseModuleItem(bool* ok) {
1436 // (Ecma 262 6th Edition, 15.2): 1439 // (Ecma 262 6th Edition, 15.2):
1437 // ModuleItem : 1440 // ModuleItem :
(...skipping 4943 matching lines...) Expand 10 before | Expand all | Expand 10 after
6381 6384
6382 Expression* Parser::SpreadCallNew(Expression* function, 6385 Expression* Parser::SpreadCallNew(Expression* function,
6383 ZoneList<v8::internal::Expression*>* args, 6386 ZoneList<v8::internal::Expression*>* args,
6384 int pos) { 6387 int pos) {
6385 args->InsertAt(0, function, zone()); 6388 args->InsertAt(0, function, zone());
6386 6389
6387 return factory()->NewCallRuntime(Context::REFLECT_CONSTRUCT_INDEX, args, pos); 6390 return factory()->NewCallRuntime(Context::REFLECT_CONSTRUCT_INDEX, args, pos);
6388 } 6391 }
6389 } // namespace internal 6392 } // namespace internal
6390 } // namespace v8 6393 } // namespace v8
OLDNEW
« no previous file with comments | « src/messages.h ('k') | src/preparser.h » ('j') | src/preparser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698