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

Side by Side Diff: src/parsing/preparser.h

Issue 2154253002: [parser] Refactor some CHECK_OK calls (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 | « src/parsing/parser-base.h ('k') | src/parsing/preparser.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 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 #ifndef V8_PARSING_PREPARSER_H 5 #ifndef V8_PARSING_PREPARSER_H
6 #define V8_PARSING_PREPARSER_H 6 #define V8_PARSING_PREPARSER_H
7 7
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/base/hashmap.h" 10 #include "src/base/hashmap.h"
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 // Reporting errors. 752 // Reporting errors.
753 void ReportMessageAt(Scanner::Location location, 753 void ReportMessageAt(Scanner::Location location,
754 MessageTemplate::Template message, 754 MessageTemplate::Template message,
755 const char* arg = NULL, 755 const char* arg = NULL,
756 ParseErrorType error_type = kSyntaxError); 756 ParseErrorType error_type = kSyntaxError);
757 void ReportMessageAt(int start_pos, int end_pos, 757 void ReportMessageAt(int start_pos, int end_pos,
758 MessageTemplate::Template message, 758 MessageTemplate::Template message,
759 const char* arg = NULL, 759 const char* arg = NULL,
760 ParseErrorType error_type = kSyntaxError); 760 ParseErrorType error_type = kSyntaxError);
761 761
762 // A dummy function, just useful as an argument to CHECK_OK_CUSTOM.
763 static void Void() {}
764
762 // "null" return type creators. 765 // "null" return type creators.
763 static PreParserIdentifier EmptyIdentifier() { 766 static PreParserIdentifier EmptyIdentifier() {
764 return PreParserIdentifier::Default(); 767 return PreParserIdentifier::Default();
765 } 768 }
766 static PreParserIdentifier EmptyIdentifierString() { 769 static PreParserIdentifier EmptyIdentifierString() {
767 return PreParserIdentifier::Default(); 770 return PreParserIdentifier::Default();
768 } 771 }
769 static PreParserExpression EmptyExpression() { 772 static PreParserExpression EmptyExpression() {
770 return PreParserExpression::Default(); 773 return PreParserExpression::Default();
771 } 774 }
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 const PreParserFormalParameters& parameters, FunctionKind kind, 1264 const PreParserFormalParameters& parameters, FunctionKind kind,
1262 FunctionLiteral::FunctionType function_type, bool* ok) { 1265 FunctionLiteral::FunctionType function_type, bool* ok) {
1263 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, 1266 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters,
1264 kind, function_type, ok); 1267 kind, function_type, ok);
1265 } 1268 }
1266 1269
1267 } // namespace internal 1270 } // namespace internal
1268 } // namespace v8 1271 } // namespace v8
1269 1272
1270 #endif // V8_PARSING_PREPARSER_H 1273 #endif // V8_PARSING_PREPARSER_H
OLDNEW
« no previous file with comments | « src/parsing/parser-base.h ('k') | src/parsing/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698