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

Side by Side Diff: src/parsing/parser.cc

Issue 2172723003: [cleanup] Remove some leftover strong mode code from the parser (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | src/parsing/parser-base.h » ('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 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/parsing/parser.h" 5 #include "src/parsing/parser.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/ast-expression-rewriter.h" 9 #include "src/ast/ast-expression-rewriter.h"
10 #include "src/ast/ast-expression-visitor.h" 10 #include "src/ast/ast-expression-visitor.h"
(...skipping 2703 matching lines...) Expand 10 before | Expand all | Expand 10 after
2714 2714
2715 Statement* Parser::ParseReturnStatement(bool* ok) { 2715 Statement* Parser::ParseReturnStatement(bool* ok) {
2716 // ReturnStatement :: 2716 // ReturnStatement ::
2717 // 'return' Expression? ';' 2717 // 'return' Expression? ';'
2718 2718
2719 // Consume the return token. It is necessary to do that before 2719 // Consume the return token. It is necessary to do that before
2720 // reporting any errors on it, because of the way errors are 2720 // reporting any errors on it, because of the way errors are
2721 // reported (underlining). 2721 // reported (underlining).
2722 Expect(Token::RETURN, CHECK_OK); 2722 Expect(Token::RETURN, CHECK_OK);
2723 Scanner::Location loc = scanner()->location(); 2723 Scanner::Location loc = scanner()->location();
2724 function_state_->set_return_location(loc);
2725 2724
2726 Token::Value tok = peek(); 2725 Token::Value tok = peek();
2727 Statement* result; 2726 Statement* result;
2728 Expression* return_value; 2727 Expression* return_value;
2729 if (scanner()->HasAnyLineTerminatorBeforeNext() || 2728 if (scanner()->HasAnyLineTerminatorBeforeNext() ||
2730 tok == Token::SEMICOLON || 2729 tok == Token::SEMICOLON ||
2731 tok == Token::RBRACE || 2730 tok == Token::RBRACE ||
2732 tok == Token::EOS) { 2731 tok == Token::EOS) {
2733 if (IsSubclassConstructor(function_state_->kind())) { 2732 if (IsSubclassConstructor(function_state_->kind())) {
2734 return_value = ThisExpression(scope(), factory(), loc.beg_pos); 2733 return_value = ThisExpression(scope(), factory(), loc.beg_pos);
(...skipping 4336 matching lines...) Expand 10 before | Expand all | Expand 10 after
7071 node->Print(Isolate::Current()); 7070 node->Print(Isolate::Current());
7072 } 7071 }
7073 #endif // DEBUG 7072 #endif // DEBUG
7074 7073
7075 #undef CHECK_OK 7074 #undef CHECK_OK
7076 #undef CHECK_OK_VOID 7075 #undef CHECK_OK_VOID
7077 #undef CHECK_FAILED 7076 #undef CHECK_FAILED
7078 7077
7079 } // namespace internal 7078 } // namespace internal
7080 } // namespace v8 7079 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/parsing/parser-base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698