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

Unified Diff: dart/frog/leg/apiimpl.dart

Issue 9646030: Find diagnostic locations for use in new compiler API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix crashes and address review comments Created 8 years, 9 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 | « no previous file | dart/frog/leg/compiler.dart » ('j') | dart/frog/leg/compiler.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/apiimpl.dart
diff --git a/dart/frog/leg/apiimpl.dart b/dart/frog/leg/apiimpl.dart
index 6b29e5c4b9f4c20bf16c8ad077525db1025166c9..0c9e02031fddab2522f9dcbf6058a9fcf4a3fb21 100644
--- a/dart/frog/leg/apiimpl.dart
+++ b/dart/frog/leg/apiimpl.dart
@@ -22,10 +22,6 @@ class Compiler extends leg.Compiler {
return library;
}
- void log(message) {
- handler(null, null, null, message, false);
- }
-
Script readScript(Uri uri, [ScriptTag node]) {
String uriName = uri.toString();
// TODO(ahe): Clean this up.
@@ -55,4 +51,12 @@ class Compiler extends leg.Compiler {
}
return success;
}
+
+ void reportDiagnostic(leg.SourceSpan span, String message, bool fatal) {
+ if (span === null) {
+ handler(null, null, null, message, fatal);
+ } else {
+ handler(span.uri, span.begin, span.end, message, fatal);
+ }
+ }
}
« no previous file with comments | « no previous file | dart/frog/leg/compiler.dart » ('j') | dart/frog/leg/compiler.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698