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

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

Issue 10377186: Support a much larger subset of YAML. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review chagnes Created 8 years, 7 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 | « utils/pub/yaml/parser.dart ('k') | utils/tests/pub/yaml_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/yaml/yaml_map.dart
diff --git a/utils/pub/yaml/yaml_map.dart b/utils/pub/yaml/yaml_map.dart
index 64cef2be3ff9e4018be857342ba9eeefbba64740..27d5cfc9a94819bd43b27d2d5fba0315501a0f8b 100644
--- a/utils/pub/yaml/yaml_map.dart
+++ b/utils/pub/yaml/yaml_map.dart
@@ -18,6 +18,8 @@ class YamlMap implements Map, Hashable {
YamlMap.from(Map map) : _map = new Map.from(map);
+ YamlMap._wrap(this._map);
+
bool containsValue(value) => _map.containsValue(value);
bool containsKey(key) => _map.containsKey(_wrapKey(key));
operator [](key) => _map[_wrapKey(key)];
@@ -46,6 +48,8 @@ class YamlMap implements Map, Hashable {
(obj is! double || !obj.isNan()) &&
(obj is! Map || obj is YamlMap)) {
return obj;
+ } else if (obj is Map) {
+ return new YamlMap._wrap(obj);
}
return new _WrappedHashKey(obj);
}
« no previous file with comments | « utils/pub/yaml/parser.dart ('k') | utils/tests/pub/yaml_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698