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

Unified Diff: runtime/vm/parser.h

Issue 340203003: Cleanup of error and warning reporting. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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 | « runtime/vm/object.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.h
===================================================================
--- runtime/vm/parser.h (revision 37467)
+++ runtime/vm/parser.h (working copy)
@@ -311,32 +311,28 @@
const Function& constructor,
const TypeArguments& type_arguments);
- // A null script means no source and a negative token_pos means no position.
- static RawString* FormatMessage(const Script& script,
- intptr_t token_pos,
- LanguageError::Kind kind,
- const char* format,
- va_list args);
+ // Report already formatted error.
+ static void ReportError(const Error& error);
- // Reports error/warning msg at location of current token in current script.
- void ErrorMsg(const char* msg, ...) PRINTF_ATTRIBUTE(2, 3);
- void Warning(const char* msg, ...) PRINTF_ATTRIBUTE(2, 3);
- void Unimplemented(const char* msg);
+ // Concatenate and report an already formatted error and a new error message.
+ static void ReportErrors(const Error& prev_error,
+ const Script& script, intptr_t token_pos,
+ const char* format, ...) PRINTF_ATTRIBUTE(4, 5);
- // Reports error message at given location in current script.
- void ErrorMsg(intptr_t token_pos, const char* msg, ...) const
- PRINTF_ATTRIBUTE(3, 4);
- void Warning(intptr_t token_pos, const char* msg, ...)
- PRINTF_ATTRIBUTE(3, 4);
+ // Report error message at location of current token in current script.
+ void ReportError(const char* msg, ...) const PRINTF_ATTRIBUTE(2, 3);
- // Reports an already formatted error message.
- static void ErrorMsg(const Error& error);
+ // Report error message at given location in current script.
+ void ReportError(intptr_t token_pos,
+ const char* msg, ...) const PRINTF_ATTRIBUTE(3, 4);
- // Concatenates two error messages, the previous and the current one.
- void AppendErrorMsg(
- const Error& prev_error, intptr_t token_pos, const char* format, ...)
- PRINTF_ATTRIBUTE(4, 5);
+ // Report warning message at location of current token in current script.
+ void ReportWarning(const char* msg, ...) const PRINTF_ATTRIBUTE(2, 3);
+ // Report warning message at given location in current script.
+ void ReportWarning(intptr_t token_pos,
+ const char* msg, ...) const PRINTF_ATTRIBUTE(3, 4);
+
void CheckRecursiveInvocation();
const Instance& EvaluateConstExpr(intptr_t expr_pos, AstNode* expr);
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698