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

Unified Diff: utils/pub/yaml/parser.dart

Issue 11414069: Make mappedBy lazy. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Reupload due to error. Created 8 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
Index: utils/pub/yaml/parser.dart
diff --git a/utils/pub/yaml/parser.dart b/utils/pub/yaml/parser.dart
index 980141b026bb98d323d969e915982865ae18819b..9989e744c751619d9f35bc7f80dd1d466f3b69b0 100644
--- a/utils/pub/yaml/parser.dart
+++ b/utils/pub/yaml/parser.dart
@@ -413,7 +413,7 @@ class _Parser {
}
/** Creates a MappingNode from [pairs]. */
- _MappingNode mappedBy(List<_Pair<_Node, _Node>> pairs) {
+ _MappingNode map(List<_Pair<_Node, _Node>> pairs) {
var content = new Map<_Node, _Node>();
pairs.forEach((pair) => content[pair.first] = pair.last);
return new _MappingNode("?", content);
@@ -1325,7 +1325,7 @@ class _Parser {
]);
if (!truth(pair)) return null;
- return mappedBy([pair]);
+ return map([pair]);
}
// 151
@@ -1708,7 +1708,7 @@ class _Parser {
}));
if (!truth(pairs)) return null;
- return mappedBy(pairs);
+ return map(pairs);
});
// 188
@@ -1777,7 +1777,7 @@ class _Parser {
}));
pairs.insertRange(0, 1, first);
- return mappedBy(pairs);
+ return map(pairs);
});
// 196

Powered by Google App Engine
This is Rietveld 408576698