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

Unified Diff: pkg/front_end/lib/src/fasta/messages.dart

Issue 2970273004: Deprecate all diagnostics methods that use strings. (Closed)
Patch Set: Merged with 4df146dd9a465d63344330bf3e45524b927c92ec Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/front_end/lib/src/fasta/loader.dart ('k') | pkg/front_end/lib/src/fasta/modifier.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/messages.dart
diff --git a/pkg/front_end/lib/src/fasta/messages.dart b/pkg/front_end/lib/src/fasta/messages.dart
index 9d1943d8eb1dcd91882b8541fb57781df4e4670c..938fe4403193adc7f98edce1af9554b2931f6781 100644
--- a/pkg/front_end/lib/src/fasta/messages.dart
+++ b/pkg/front_end/lib/src/fasta/messages.dart
@@ -10,7 +10,7 @@ import 'util/relativize.dart' show relativizeUri;
import 'compiler_context.dart' show CompilerContext;
-import 'errors.dart' show InputError;
+import 'deprecated_problems.dart' show deprecated_InputError;
import 'colors.dart' show cyan, magenta;
@@ -26,22 +26,22 @@ bool get isVerbose => CompilerContext.current.options.verbose;
bool get hideNits => !isVerbose;
-void warning(Uri uri, int charOffset, String message) {
+void deprecated_warning(Uri uri, int charOffset, String message) {
if (hideWarnings) return;
- print(format(uri, charOffset, colorWarning("Warning: $message")));
+ print(deprecated_format(uri, charOffset, colorWarning("Warning: $message")));
if (warningsAreFatal) {
if (isVerbose) print(StackTrace.current);
- throw new InputError(
+ throw new deprecated_InputError(
uri, charOffset, "Compilation aborted due to fatal warnings.");
}
}
-void nit(Uri uri, int charOffset, String message) {
+void deprecated_nit(Uri uri, int charOffset, String message) {
if (hideNits) return;
- print(format(uri, charOffset, colorNit("Nit: $message")));
+ print(deprecated_format(uri, charOffset, colorNit("Nit: $message")));
if (nitsAreFatal) {
if (isVerbose) print(StackTrace.current);
- throw new InputError(
+ throw new deprecated_InputError(
uri, charOffset, "Compilation aborted due to fatal nits.");
}
}
@@ -58,7 +58,7 @@ String colorNit(String message) {
return cyan(message);
}
-String format(Uri uri, int charOffset, String message) {
+String deprecated_format(Uri uri, int charOffset, String message) {
if (uri != null) {
String path = relativizeUri(uri);
Location location = charOffset == -1 ? null : getLocation(path, charOffset);
« no previous file with comments | « pkg/front_end/lib/src/fasta/loader.dart ('k') | pkg/front_end/lib/src/fasta/modifier.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698