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

Unified Diff: src/parsing/parser.cc

Issue 2312263002: [parser] Refactor of Parse*Statement*, part 2 (Closed)
Patch Set: The real patch Created 4 years, 3 months 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/parsing/parser.h ('k') | src/parsing/parser-base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index c103b9efdac606927209a105f4e596a37514dced..6f3b92611e8b7d3f1ad6867fbf94b18380eb55c1 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -1600,36 +1600,6 @@ Statement* Parser::ParseClassDeclaration(ZoneList<const AstRawString*>* names,
return assignment_statement;
}
-Block* Parser::ParseBlock(ZoneList<const AstRawString*>* labels, bool* ok) {
- // The harmony mode uses block elements instead of statements.
- //
- // Block ::
- // '{' StatementList '}'
-
- // Construct block expecting 16 statements.
- Block* body = factory()->NewBlock(labels, 16, false, kNoSourcePosition);
-
- // Parse the statements and collect escaping labels.
- Expect(Token::LBRACE, CHECK_OK);
- {
- BlockState block_state(&scope_state_);
- block_state.set_start_position(scanner()->location().beg_pos);
- ParserTarget target(this, body);
-
- while (peek() != Token::RBRACE) {
- Statement* stat = ParseStatementListItem(CHECK_OK);
- if (stat && !stat->IsEmpty()) {
- body->statements()->Add(stat, zone());
- }
- }
-
- Expect(Token::RBRACE, CHECK_OK);
- block_state.set_end_position(scanner()->location().end_pos);
- body->set_scope(block_state.FinalizedBlockScope());
- }
- return body;
-}
-
Block* Parser::BuildInitializationBlock(
DeclarationParsingResult* parsing_result,
ZoneList<const AstRawString*>* names, bool* ok) {
« no previous file with comments | « src/parsing/parser.h ('k') | src/parsing/parser-base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698