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

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

Issue 10701091: Dartdoc and Apidoc updated to use dart2js through the mirror system. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: create-sdk.py updated Created 8 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
Index: lib/compiler/implementation/compiler.dart
diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart
index 7dd7384e3f11ed35aa005e8fbfc20e8394551259..13cec91b51610869a0f6d17fad896ac3f784e83e 100644
--- a/lib/compiler/implementation/compiler.dart
+++ b/lib/compiler/implementation/compiler.dart
@@ -886,7 +886,7 @@ class Compiler implements DiagnosticListener {
// URI.
throw 'Cannot find tokens to produce error message.';
}
- if (uri === null) {
+ if (uri === null && currentElement !== null) {
uri = currentElement.getCompilationUnit().script.uri;
}
return SourceSpan.withCharacterOffsets(begin, end,
@@ -998,4 +998,8 @@ class SourceSpan {
assert(endOffset >= beginOffset);
return f(beginOffset, endOffset);
}
+
+ String toString() {
kasperl 2012/07/06 12:40:41 Use => notation?
Johnni Winther 2012/07/09 14:57:18 Done.
+ return 'SourceSpan($uri,$begin,$end)';
+ }
}

Powered by Google App Engine
This is Rietveld 408576698