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

Unified Diff: src/preparser.cc

Issue 273653002: Parser / PreParser: Simplify error message arguments. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 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/preparser.h ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.cc
diff --git a/src/preparser.cc b/src/preparser.cc
index 96623b9526a8c0dbf768a37393fe50c26e4df084..3b43e7e2571146c9e571e322c6d028dfa92a23c1 100644
--- a/src/preparser.cc
+++ b/src/preparser.cc
@@ -35,31 +35,22 @@ namespace internal {
void PreParserTraits::ReportMessageAt(Scanner::Location location,
const char* message,
- Vector<const char*> args,
+ const char* arg,
bool is_reference_error) {
ReportMessageAt(location.beg_pos,
location.end_pos,
message,
- args.length() > 0 ? args[0] : NULL,
+ arg,
is_reference_error);
}
-void PreParserTraits::ReportMessageAt(Scanner::Location location,
- const char* type,
- const char* name_opt,
- bool is_reference_error) {
- pre_parser_->log_->LogMessage(location.beg_pos, location.end_pos, type,
- name_opt, is_reference_error);
-}
-
-
void PreParserTraits::ReportMessageAt(int start_pos,
int end_pos,
- const char* type,
- const char* name_opt,
+ const char* message,
+ const char* arg,
bool is_reference_error) {
- pre_parser_->log_->LogMessage(start_pos, end_pos, type, name_opt,
+ pre_parser_->log_->LogMessage(start_pos, end_pos, message, arg,
is_reference_error);
}
@@ -294,8 +285,7 @@ PreParser::Statement PreParser::ParseStatement(bool* ok) {
if (strict_mode() == STRICT) {
PreParserTraits::ReportMessageAt(start_location.beg_pos,
end_location.end_pos,
- "strict_function",
- NULL);
+ "strict_function");
*ok = false;
return Statement::Default();
} else {
« no previous file with comments | « src/preparser.h ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698