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

Unified Diff: lib/text/ast_to_text.dart

Issue 2502343002: Store named parameters in sorted lists instead of using maps. (Closed)
Patch Set: Remove duplicates from named parameter lists to recover from erroneous inputs Created 4 years, 1 month 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 | « lib/checks.dart ('k') | lib/transformations/treeshaker.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/text/ast_to_text.dart
diff --git a/lib/text/ast_to_text.dart b/lib/text/ast_to_text.dart
index 55d6ebb8ada05996b594478b7f8b5909b5874585..9e9a093bb2b206a8b5415e8bc8ccc4974eafb88d 100644
--- a/lib/text/ast_to_text.dart
+++ b/lib/text/ast_to_text.dart
@@ -1391,10 +1391,7 @@ class Printer extends Visitor<Null> {
writeComma();
}
writeSymbol('{');
- writeList(node.namedParameters.keys, (name) {
- writeType(node.namedParameters[name]);
- writeWord(name);
- });
+ writeList(node.namedParameters, visitNamedType);
writeSymbol('}');
}
writeSymbol(')');
@@ -1402,6 +1399,13 @@ class Printer extends Visitor<Null> {
writeType(node.returnType);
}
+ visitNamedType(NamedType node) {
+ writeWord(node.name);
+ writeSymbol(':');
+ writeSpace();
+ writeType(node.type);
+ }
+
visitTypeParameterType(TypeParameterType node) {
writeTypeParameterReference(node.parameter);
}
« no previous file with comments | « lib/checks.dart ('k') | lib/transformations/treeshaker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698