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

Unified Diff: pkg/front_end/tool/_fasta/generate_messages.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/tool/_fasta/generate_messages.dart
diff --git a/pkg/front_end/tool/_fasta/generate_messages.dart b/pkg/front_end/tool/_fasta/generate_messages.dart
index 6915d4fae03cabce6880b18e415676b68fb17db4..7497befe8738088ff6c396a73ad7f72818e91058 100644
--- a/pkg/front_end/tool/_fasta/generate_messages.dart
+++ b/pkg/front_end/tool/_fasta/generate_messages.dart
@@ -73,6 +73,11 @@ String compileTemplate(String name, String template, String tip,
arguments.add("'name': name");
break;
+ case "#name2":
+ parameters.add("String name2");
+ arguments.add("'name2': name2");
+ break;
+
case "#lexeme":
parameters.add("Token token");
conversions.add("String lexeme = token.lexeme;");
@@ -84,6 +89,23 @@ String compileTemplate(String name, String template, String tip,
arguments.add("'string': string");
break;
+ case "#string2":
Siggi Cherem (dart-lang) 2017/07/11 21:25:27 How about `#kind:n` to make it a bit more flexible
ahe 2017/07/12 12:42:13 This has been annoying me as well, but I'll deal w
+ parameters.add("String string2");
+ arguments.add("'string2': string2");
+ break;
+
+ case "#uri":
+ parameters.add("Uri uri_");
+ conversions.add("String uri = relativizeUri(uri_);");
+ arguments.add("'uri': uri_");
+ break;
+
+ case "#uri2":
+ parameters.add("Uri uri2_");
+ conversions.add("String uri2 = relativizeUri(uri2_);");
+ arguments.add("'uri': uri2_");
+ break;
+
default:
throw "Unhandled placeholder in template: ${match[0]}";
}
« pkg/front_end/lib/src/fasta/fasta_codes.dart ('K') | « pkg/front_end/messages.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698