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

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

Issue 2664593002: Port parser and scanner fixes from rasta branch. (Closed)
Patch Set: Rebased on ef8ec26cf36d1f07b4fdf5d605003210826ae1c2. 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
« no previous file with comments | « pkg/compiler/lib/src/parser/element_listener.dart ('k') | pkg/front_end/lib/src/fasta/parser.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/errors.dart
diff --git a/pkg/front_end/lib/src/fasta/errors.dart b/pkg/front_end/lib/src/fasta/errors.dart
index b12eddee31394da4e8ae333ff5b4d2334cc17b51..624d8f0fc5ffa66c2cf67e01366ab49f9b80dad6 100644
--- a/pkg/front_end/lib/src/fasta/errors.dart
+++ b/pkg/front_end/lib/src/fasta/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 {
« no previous file with comments | « pkg/compiler/lib/src/parser/element_listener.dart ('k') | pkg/front_end/lib/src/fasta/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698