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

Side by Side Diff: src/preparser.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 unified diff | Download patch
« no previous file with comments | « src/parser.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 <cmath> 5 #include <cmath>
6 6
7 #include "src/allocation.h" 7 #include "src/allocation.h"
8 #include "src/base/logging.h" 8 #include "src/base/logging.h"
9 #include "src/conversions-inl.h" 9 #include "src/conversions-inl.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 Expect(Token::CASE, CHECK_OK); 656 Expect(Token::CASE, CHECK_OK);
657 ParseExpression(true, CHECK_OK); 657 ParseExpression(true, CHECK_OK);
658 } else { 658 } else {
659 Expect(Token::DEFAULT, CHECK_OK); 659 Expect(Token::DEFAULT, CHECK_OK);
660 } 660 }
661 Expect(Token::COLON, CHECK_OK); 661 Expect(Token::COLON, CHECK_OK);
662 token = peek(); 662 token = peek();
663 while (token != Token::CASE && 663 while (token != Token::CASE &&
664 token != Token::DEFAULT && 664 token != Token::DEFAULT &&
665 token != Token::RBRACE) { 665 token != Token::RBRACE) {
666 ParseStatement(CHECK_OK); 666 ParseStatementListItem(CHECK_OK);
667 token = peek(); 667 token = peek();
668 } 668 }
669 } 669 }
670 Expect(Token::RBRACE, ok); 670 Expect(Token::RBRACE, ok);
671 return Statement::Default(); 671 return Statement::Default();
672 } 672 }
673 673
674 674
675 PreParser::Statement PreParser::ParseDoWhileStatement(bool* ok) { 675 PreParser::Statement PreParser::ParseDoWhileStatement(bool* ok) {
676 // DoStatement :: 676 // DoStatement ::
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 ParseIdentifier(kAllowEvalOrArguments, CHECK_OK); 1016 ParseIdentifier(kAllowEvalOrArguments, CHECK_OK);
1017 ParseArguments(ok); 1017 ParseArguments(ok);
1018 1018
1019 return Expression::Default(); 1019 return Expression::Default();
1020 } 1020 }
1021 1021
1022 #undef CHECK_OK 1022 #undef CHECK_OK
1023 1023
1024 1024
1025 } } // v8::internal 1025 } } // v8::internal
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698