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

Unified Diff: pkg/front_end/lib/src/fasta/messages.dart

Issue 2951453002: [kernel] Make fasta call a new constructor on FallThroughError (Closed)
Patch Set: Created 3 years, 6 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: 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]

Powered by Google App Engine
This is Rietveld 408576698