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

Unified Diff: dart/lib/compiler/implementation/colors.dart

Issue 10579015: Update dart2js to use diagnostic kinds. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | « dart/lib/compiler/implementation/apiimpl.dart ('k') | dart/lib/compiler/implementation/compiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/lib/compiler/implementation/colors.dart
diff --git a/dart/lib/compiler/implementation/colors.dart b/dart/lib/compiler/implementation/colors.dart
index dcabedbee1ec88c69fa40d7b6148a3fff0a925db..abc85ef9303fcf8c3035d160b5a49e132930fbf3 100644
--- a/dart/lib/compiler/implementation/colors.dart
+++ b/dart/lib/compiler/implementation/colors.dart
@@ -9,17 +9,7 @@ final String RED_COLOR = '\u001b[31m';
final String MAGENTA_COLOR = '\u001b[35m';
final String NO_COLOR = '\u001b[0m';
-// BUG(2654): This is a fairly hacky way of turning of coloring used
-// in messages. It would be better if the coloring could be dealt with
-// entirely by the user of the compiler API, but that is not the case
-// today.
-bool enabled = true;
-
-String wrap(String string, String color)
- => enabled ? "${color}$string${NO_COLOR}" : string;
-String green(String string)
- => wrap(string, GREEN_COLOR);
-String red(String string)
- => wrap(string, RED_COLOR);
-String magenta(String string)
- => wrap(string, MAGENTA_COLOR);
+String wrap(String string, String color) => "${color}$string${NO_COLOR}";
+String green(String string) => wrap(string, GREEN_COLOR);
+String red(String string) => wrap(string, RED_COLOR);
+String magenta(String string) => wrap(string, MAGENTA_COLOR);
« no previous file with comments | « dart/lib/compiler/implementation/apiimpl.dart ('k') | dart/lib/compiler/implementation/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698