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

Unified Diff: src/parser.h

Issue 1130133003: Migrate error messages, part 12. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@messages_11
Patch Set: Created 5 years, 7 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/objects-printer.cc ('k') | src/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index 4d4dd222c529d704f8284613c8f6b0ec17269656..4b4f12af292ea7e8f1161e4babfba9187d3e69ce 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -659,33 +659,36 @@ class ParserTraits {
int pos, AstNodeFactory* factory);
// Generate AST node that throws a ReferenceError with the given type.
- Expression* NewThrowReferenceError(const char* type, int pos);
+ Expression* NewThrowReferenceError(MessageTemplate::Template message,
+ int pos);
// Generate AST node that throws a SyntaxError with the given
// type. The first argument may be null (in the handle sense) in
// which case no arguments are passed to the constructor.
- Expression* NewThrowSyntaxError(
- const char* type, const AstRawString* arg, int pos);
+ Expression* NewThrowSyntaxError(MessageTemplate::Template message,
+ const AstRawString* arg, int pos);
// Generate AST node that throws a TypeError with the given
// type. Both arguments must be non-null (in the handle sense).
- Expression* NewThrowTypeError(const char* type, const AstRawString* arg,
- int pos);
+ Expression* NewThrowTypeError(MessageTemplate::Template message,
+ const AstRawString* arg, int pos);
// Generic AST generator for throwing errors from compiled code.
- Expression* NewThrowError(
- const AstRawString* constructor, const char* type,
- const AstRawString* arg, int pos);
+ Expression* NewThrowError(const AstRawString* constructor,
+ MessageTemplate::Template message,
+ const AstRawString* arg, int pos);
// Reporting errors.
- void ReportMessageAt(Scanner::Location source_location, const char* message,
+ void ReportMessageAt(Scanner::Location source_location,
+ MessageTemplate::Template message,
const char* arg = NULL,
ParseErrorType error_type = kSyntaxError);
- void ReportMessage(const char* message, const char* arg = NULL,
+ void ReportMessage(MessageTemplate::Template message, const char* arg = NULL,
ParseErrorType error_type = kSyntaxError);
- void ReportMessage(const char* message, const AstRawString* arg,
+ void ReportMessage(MessageTemplate::Template message, const AstRawString* arg,
ParseErrorType error_type = kSyntaxError);
- void ReportMessageAt(Scanner::Location source_location, const char* message,
+ void ReportMessageAt(Scanner::Location source_location,
+ MessageTemplate::Template message,
const AstRawString* arg,
ParseErrorType error_type = kSyntaxError);
« no previous file with comments | « src/objects-printer.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698