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

Unified Diff: src/preparser.cc

Issue 1433743005: [cleanup] Remove un-scoped ParseBlock from Parser (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Change preparser to match 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.cc
diff --git a/src/preparser.cc b/src/preparser.cc
index 4b86d78597d3c791d0bbdd7fcebbab38b69acf17..af84cd07aac8f7e663c73f94a9b85947c1910fb4 100644
--- a/src/preparser.cc
+++ b/src/preparser.cc
@@ -477,19 +477,12 @@ PreParser::Statement PreParser::ParseClassDeclaration(bool* ok) {
PreParser::Statement PreParser::ParseBlock(bool* ok) {
// Block ::
- // '{' Statement* '}'
+ // '{' StatementList '}'
- // Note that a Block does not introduce a new execution scope!
- // (ECMA-262, 3rd, 12.2)
- //
Expect(Token::LBRACE, CHECK_OK);
Statement final = Statement::Default();
while (peek() != Token::RBRACE) {
- if (is_strict(language_mode()) || allow_harmony_sloppy()) {
- final = ParseStatementListItem(CHECK_OK);
- } else {
- final = ParseStatement(CHECK_OK);
- }
+ final = ParseStatementListItem(CHECK_OK);
}
Expect(Token::RBRACE, ok);
return final;
« no previous file with comments | « src/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698