Index: pkg/front_end/lib/src/fasta/messages.dart |
diff --git a/pkg/front_end/lib/src/fasta/messages.dart b/pkg/front_end/lib/src/fasta/messages.dart |
index 1876ccc16df2d42b44a467aabae21540b2e10ed2..b6e233e7bf6709ef24010cc3fb9bb544c225e23e 100644 |
--- a/pkg/front_end/lib/src/fasta/messages.dart |
+++ b/pkg/front_end/lib/src/fasta/messages.dart |
@@ -81,6 +81,11 @@ Location getLocation(String path, int charOffset) { |
?.getLocation(path, charOffset); |
} |
+Location getLocationFromUri(Uri uri, int charOffset) { |
ahe
2017/06/19 14:33:06
if (charOffset == -1) return null;
jensj
2017/06/20 11:24:49
Done.
|
+ String path = relativizeUri(uri); |
+ return getLocation(path, charOffset); |
+} |
+ |
String getSourceLine(Location location) { |
if (location == null) return null; |
return CompilerContext.current.uriToSource[location.file] |