Index: src/parsing/parser-base.h |
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h |
index 192235dd77ca84b87495b48042e8c1a52f13f4dc..a01253b26caf56c9b61deaf5d63ab0e96d0964e3 100644 |
--- a/src/parsing/parser-base.h |
+++ b/src/parsing/parser-base.h |
@@ -869,11 +869,31 @@ class ParserBase : public Traits { |
Traits::ReportMessageAt(source_location, message, arg, error_type); |
} |
+ void ReportMessage(MessageTemplate::Template message, const AstRawString* arg, |
+ ParseErrorType error_type = kSyntaxError) { |
+ Scanner::Location source_location = scanner()->location(); |
+ Traits::ReportMessageAt(source_location, message, arg, error_type); |
+ } |
+ |
+ void ReportMessageAt(Scanner::Location location, |
+ MessageTemplate::Template message, |
+ const char* arg = NULL, |
+ ParseErrorType error_type = kSyntaxError) { |
+ Traits::ReportMessageAt(location, message, arg, error_type); |
+ } |
+ |
void ReportMessageAt(Scanner::Location location, |
MessageTemplate::Template message, |
+ const AstRawString* arg, |
ParseErrorType error_type = kSyntaxError) { |
- Traits::ReportMessageAt(location, message, reinterpret_cast<const char*>(0), |
- error_type); |
+ Traits::ReportMessageAt(location, message, arg, error_type); |
+ } |
+ |
+ void ReportMessageAt(Scanner::Location location, |
+ MessageTemplate::Template message, |
+ ParseErrorType error_type) { |
+ ReportMessageAt(location, message, static_cast<const char*>(nullptr), |
+ error_type); |
} |
void GetUnexpectedTokenMessage( |