| 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..b48926c00e36537e62891a5895b02c633588c8e4 100644 | 
| --- a/pkg/front_end/lib/src/fasta/messages.dart | 
| +++ b/pkg/front_end/lib/src/fasta/messages.dart | 
| @@ -81,6 +81,12 @@ Location getLocation(String path, int charOffset) { | 
| ?.getLocation(path, charOffset); | 
| } | 
|  | 
| +Location getLocationFromUri(Uri uri, int charOffset) { | 
| +  if (charOffset == -1) return null; | 
| +  String path = relativizeUri(uri); | 
| +  return getLocation(path, charOffset); | 
| +} | 
| + | 
| String getSourceLine(Location location) { | 
| if (location == null) return null; | 
| return CompilerContext.current.uriToSource[location.file] | 
|  |