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

Side by Side Diff: utils/pub/yaml/yaml.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | « utils/pub/yaml/visitor.dart ('k') | utils/pub/yaml/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 library yaml; 5 library yaml;
6 6
7 import 'dart:math' as Math; 7 import 'dart:math' as Math;
8 8
9 import 'deep_equals.dart'; 9 import 'deep_equals.dart';
10 10
(...skipping 21 matching lines...) Expand all
32 } 32 }
33 33
34 /// Loads a stream of documents from a YAML string. 34 /// Loads a stream of documents from a YAML string.
35 /// 35 ///
36 /// The return value is mostly normal Dart objects. However, since YAML mappings 36 /// The return value is mostly normal Dart objects. However, since YAML mappings
37 /// support some key types that the default Dart map implementation doesn't 37 /// support some key types that the default Dart map implementation doesn't
38 /// (null, NaN, booleans, lists, and maps), all maps in the returned document 38 /// (null, NaN, booleans, lists, and maps), all maps in the returned document
39 /// are YamlMaps. These have a few small behavioral differences from the default 39 /// are YamlMaps. These have a few small behavioral differences from the default
40 /// Map implementation; for details, see the YamlMap class. 40 /// Map implementation; for details, see the YamlMap class.
41 List loadYamlStream(String yaml) { 41 List loadYamlStream(String yaml) {
42 return new _Parser(yaml).l_yamlStream().map((doc) => 42 return new _Parser(yaml).l_yamlStream().mappedBy((doc) =>
43 new _Constructor(new _Composer(doc).compose()).construct()); 43 new _Constructor(new _Composer(doc).compose()).construct())
44 .toList();
44 } 45 }
45 46
46 /// An error thrown by the YAML processor. 47 /// An error thrown by the YAML processor.
47 class YamlException implements Exception { 48 class YamlException implements Exception {
48 String msg; 49 String msg;
49 50
50 YamlException(this.msg); 51 YamlException(this.msg);
51 52
52 String toString() => msg; 53 String toString() => msg;
53 } 54 }
OLDNEW
« no previous file with comments | « utils/pub/yaml/visitor.dart ('k') | utils/pub/yaml/yaml_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698