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

Side by Side Diff: pkg/yaml/lib/yaml.dart

Issue 12090093: Reapply "Rename mappedBy to map." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed bug in previous commit. Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/yaml/lib/visitor.dart ('k') | pkg/yaml/lib/yaml_map.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// A parser for [YAML](http://www.yaml.org/). 5 /// A parser for [YAML](http://www.yaml.org/).
6 /// 6 ///
7 /// Use [loadYaml] to load a single document, or [loadYamlStream] to load a 7 /// Use [loadYaml] to load a single document, or [loadYamlStream] to load a
8 /// stream of documents. For example: 8 /// stream of documents. For example:
9 /// 9 ///
10 /// import 'package:yaml/yaml.dart'; 10 /// import 'package:yaml/yaml.dart';
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 54
55 /// Loads a stream of documents from a YAML string. 55 /// Loads a stream of documents from a YAML string.
56 /// 56 ///
57 /// The return value is mostly normal Dart objects. However, since YAML mappings 57 /// The return value is mostly normal Dart objects. However, since YAML mappings
58 /// support some key types that the default Dart map implementation doesn't 58 /// support some key types that the default Dart map implementation doesn't
59 /// (null, NaN, booleans, lists, and maps), all maps in the returned document 59 /// (null, NaN, booleans, lists, and maps), all maps in the returned document
60 /// are YamlMaps. These have a few small behavioral differences from the default 60 /// are YamlMaps. These have a few small behavioral differences from the default
61 /// Map implementation; for details, see the YamlMap class. 61 /// Map implementation; for details, see the YamlMap class.
62 List loadYamlStream(String yaml) { 62 List loadYamlStream(String yaml) {
63 return new _Parser(yaml).l_yamlStream().mappedBy((doc) => 63 return new _Parser(yaml).l_yamlStream()
64 new _Constructor(new _Composer(doc).compose()).construct()) 64 .map((doc) => new _Constructor(new _Composer(doc).compose()).construct())
65 .toList(); 65 .toList();
66 } 66 }
67 67
68 /// An error thrown by the YAML processor. 68 /// An error thrown by the YAML processor.
69 class YamlException implements Exception { 69 class YamlException implements Exception {
70 String msg; 70 String msg;
71 71
72 YamlException(this.msg); 72 YamlException(this.msg);
73 73
74 String toString() => msg; 74 String toString() => msg;
75 } 75 }
OLDNEW
« no previous file with comments | « pkg/yaml/lib/visitor.dart ('k') | pkg/yaml/lib/yaml_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698