Index: sdk/lib/_internal/compiler/implementation/apiimpl.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/apiimpl.dart b/sdk/lib/_internal/compiler/implementation/apiimpl.dart |
index 0afeed47dbd422ee25041f9a8aed020b953c7476..6ad363a5072ce7b0172a7a926e6943a484492abd 100644 |
--- a/sdk/lib/_internal/compiler/implementation/apiimpl.dart |
+++ b/sdk/lib/_internal/compiler/implementation/apiimpl.dart |
@@ -14,6 +14,7 @@ import 'ssa/tracer.dart' as ssa; |
import '../../libraries.dart'; |
import 'source_file.dart'; |
+ |
class Compiler extends leg.Compiler { |
api.CompilerInputProvider provider; |
api.DiagnosticHandler handler; |
@@ -284,8 +285,10 @@ class Compiler extends leg.Compiler { |
}); |
} |
- void reportDiagnostic(leg.SourceSpan span, String message, |
+ void reportDiagnostic(leg.Spannable node, |
+ leg.Diagnostic message, |
floitsch
2014/02/19 14:57:40
We really have to change one of the names...
|
api.Diagnostic kind) { |
+ leg.SourceSpan span = spanFromSpannable(node); |
if (identical(kind, api.Diagnostic.ERROR) |
|| identical(kind, api.Diagnostic.CRASH)) { |
compilationFailed = true; |
@@ -293,10 +296,10 @@ class Compiler extends leg.Compiler { |
// [:span.uri:] might be [:null:] in case of a [Script] with no [uri]. For |
// instance in the [Types] constructor in typechecker.dart. |
if (span == null || span.uri == null) { |
- callUserHandler(null, null, null, message, kind); |
+ callUserHandler(null, null, null, '$message', kind); |
} else { |
callUserHandler( |
- translateUri(span.uri, null), span.begin, span.end, message, kind); |
+ translateUri(span.uri, null), span.begin, span.end, '$message', kind); |
} |
} |