Index: pkg/front_end/lib/src/fasta/fasta_codes.dart |
diff --git a/pkg/front_end/lib/src/fasta/fasta_codes.dart b/pkg/front_end/lib/src/fasta/fasta_codes.dart |
index 67631e6aca2ec22dede2c0f5d669fdf7c84c8f63..f62f6802a98eebf4450dc8afeb1edc5773b89eb7 100644 |
--- a/pkg/front_end/lib/src/fasta/fasta_codes.dart |
+++ b/pkg/front_end/lib/src/fasta/fasta_codes.dart |
@@ -4,7 +4,9 @@ |
library fasta.codes; |
-import 'package:front_end/src/scanner/token.dart' show Token; |
+import '../scanner/token.dart' show Token; |
+ |
+import 'util/relativize.dart' as util show relativizeUri; |
part 'fasta_codes_generated.dart'; |
@@ -83,3 +85,13 @@ class LocatedMessage { |
Map<String, dynamic> get arguments => messageObject.arguments; |
} |
+ |
+String relativizeUri(Uri uri) { |
+ // We have this method here for two reasons: |
+ // |
+ // 1. It allows us to implement #uri message argument without using it |
+ // (otherwise, we might get an `UNUSED_IMPORT` warning). |
Siggi Cherem (dart-lang)
2017/07/11 21:25:27
Note that for #1 is enough to add a dartdoc refere
ahe
2017/07/12 12:42:12
Acknowledged.
|
+ // |
+ // 2. We can change `base` argument here if needed. |
+ return util.relativizeUri(uri, base: Uri.base); |
+} |