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

Unified Diff: pkg/front_end/tool/_fasta/generate_messages.dart

Issue 2976743002: Sort generated messages. (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
« no previous file with comments | « pkg/front_end/lib/src/fasta/fasta_codes_generated.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7497befe8738088ff6c396a73ad7f72818e91058..6337eb75028095461903713e880b73516857cdec 100644
--- a/pkg/front_end/tool/_fasta/generate_messages.dart
+++ b/pkg/front_end/tool/_fasta/generate_messages.dart
@@ -29,14 +29,16 @@ main(List<String> arguments) async {
part of fasta.codes;
""");
- yaml.forEach((String name, description) {
+ List<String> keys = yaml.keys.toList()..sort();
+ for (String name in keys) {
+ var description = yaml[name];
while (description is String) {
description = yaml[description];
}
Map map = description;
sb.writeln(compileTemplate(name, map['template'], map['tip'],
map['analyzerCode'], map['dart2jsCode']));
- });
+ }
String dartfmtedText = new DartFormatter().format("$sb");
« no previous file with comments | « pkg/front_end/lib/src/fasta/fasta_codes_generated.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698