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

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

Issue 2977653003: Implement more message argument kinds. (Closed)
Patch Set: Created 3 years, 5 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/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);
+}

Powered by Google App Engine
This is Rietveld 408576698