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

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

Issue 2951453002: [kernel] Make fasta call a new constructor on FallThroughError (Closed)
Patch Set: Addressed comments 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
« no previous file with comments | « pkg/front_end/lib/src/fasta/loader.dart ('k') | pkg/front_end/lib/src/fasta/target_implementation.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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]
« no previous file with comments | « pkg/front_end/lib/src/fasta/loader.dart ('k') | pkg/front_end/lib/src/fasta/target_implementation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698