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

Unified Diff: lib/src/messages.dart

Issue 22962005: Merge pull request #581 from kevmoo/polymer (Closed) Base URL: https://github.com/dart-lang/web-ui.git@polymer
Patch Set: Created 7 years, 4 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 | « lib/src/info.dart ('k') | lib/src/observable_transform.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/messages.dart
diff --git a/lib/src/messages.dart b/lib/src/messages.dart
index 42032b3311ea63613b9c584ede5729a31aa2e1a8..5dc62475fe0279207e9abe9ce0e4af461417cf77 100644
--- a/lib/src/messages.dart
+++ b/lib/src/messages.dart
@@ -6,6 +6,7 @@ library messages;
import 'dart:json' as json;
+import 'package:barback/barback.dart' show TransformLogger;
import 'package:source_maps/span.dart' show Span;
import 'package:logging/logging.dart' show Level;
@@ -70,7 +71,7 @@ class Message {
* This class tracks and prints information, warnings, and errors emitted by the
* compiler.
*/
-class Messages {
+class Messages implements TransformLogger {
final CompilerOptions options;
final bool shouldPrint;
@@ -101,7 +102,7 @@ class Messages {
}
/** [message] is considered a static compile-time error by the Dart lang. */
- void error(String message, Span span) {
+ void error(String message, [Span span]) {
var msg = new Message(Level.SEVERE, message, span: span,
useColors: options.useColors);
@@ -110,7 +111,7 @@ class Messages {
}
/** [message] is considered a type warning by the Dart lang. */
- void warning(String message, Span span) {
+ void warning(String message, [Span span]) {
if (options.warningsAsErrors) {
error(message, span);
} else {
@@ -134,7 +135,7 @@ class Messages {
* [message] at [span] will tell the user about what the compiler
* is doing.
*/
- void info(String message, Span span) {
+ void info(String message, [Span span]) {
var msg = new Message(Level.INFO, message, span: span,
useColors: options.useColors);
« no previous file with comments | « lib/src/info.dart ('k') | lib/src/observable_transform.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698