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

Unified Diff: pkg/fasta/lib/src/errors.dart

Issue 2664593002: Port parser and scanner fixes from rasta branch. (Closed)
Patch Set: Update status files. Created 3 years, 11 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/fasta/lib/src/errors.dart
diff --git a/pkg/fasta/lib/src/errors.dart b/pkg/fasta/lib/src/errors.dart
index b12eddee31394da4e8ae333ff5b4d2334cc17b51..624d8f0fc5ffa66c2cf67e01366ab49f9b80dad6 100644
--- a/pkg/fasta/lib/src/errors.dart
+++ b/pkg/fasta/lib/src/errors.dart
@@ -56,6 +56,11 @@ class InputError {
// Windows.
String message = red("Error: ${safeToString(error)}");
if (uri != null) {
+ String uri = "${this.uri}";
+ String base = "${Uri.base}";
+ if (uri.startsWith(base)) {
+ uri = uri.substring(base.length);
+ }
String position = charOffset == -1 ? "" : "$charOffset:";
return "${uri}:$position $message";
} else {

Powered by Google App Engine
This is Rietveld 408576698