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

Unified Diff: src/parser.cc

Issue 964063003: Fix test for function declarations syntax error. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years, 9 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 | « no previous file | src/preparser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index c038ca2fa7f8db18b32436554a70d920ce829e50..2d48254134585f2c5adf036e2b6645c05017a08e 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -2758,8 +2758,8 @@ Statement* Parser::ParseWithStatement(ZoneList<const AstRawString*>* labels,
CaseClause* Parser::ParseCaseClause(bool* default_seen_ptr, bool* ok) {
// CaseClause ::
- // 'case' Expression ':' Statement*
- // 'default' ':' Statement*
+ // 'case' Expression ':' StatementList
+ // 'default' ':' StatementList
Expression* label = NULL; // NULL expression indicates default case
if (peek() == Token::CASE) {
@@ -2781,7 +2781,7 @@ CaseClause* Parser::ParseCaseClause(bool* default_seen_ptr, bool* ok) {
while (peek() != Token::CASE &&
peek() != Token::DEFAULT &&
peek() != Token::RBRACE) {
- Statement* stat = ParseStatement(NULL, CHECK_OK);
+ Statement* stat = ParseStatementListItem(CHECK_OK);
statements->Add(stat, zone());
}
« no previous file with comments | « no previous file | src/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698