OLD | NEW |
---|---|
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 /** | |
6 * A parser for [YAML](http://www.yaml.org/). | |
7 * | |
8 * Use [loadYaml] to load a single document, or [loadYamlStream] to load a | |
9 * stream of documents. For example: | |
10 * | |
11 * import 'package:yaml/yaml.dart'; | |
12 * main() { | |
13 * var doc = loadYaml("YAML: YAML Ain't Markup Language"); | |
14 * print(doc['YAML']); | |
15 * } | |
16 */ | |
nweiz
2012/12/18 18:45:17
It would be good to mention that this library curr
Jennifer Messerly
2012/12/18 18:59:31
Sure.
nweiz
2012/12/18 19:02:53
Our policy in pub, which I think makes sense for t
| |
5 library yaml; | 17 library yaml; |
6 | 18 |
7 import 'dart:math' as Math; | 19 import 'dart:math' as Math; |
8 | 20 |
9 import 'deep_equals.dart'; | 21 import 'deep_equals.dart'; |
10 | 22 |
11 part 'yaml_map.dart'; | 23 part 'yaml_map.dart'; |
12 part 'model.dart'; | 24 part 'model.dart'; |
13 part 'parser.dart'; | 25 part 'parser.dart'; |
14 part 'visitor.dart'; | 26 part 'visitor.dart'; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
48 } | 60 } |
49 | 61 |
50 /** An error thrown by the YAML processor. */ | 62 /** An error thrown by the YAML processor. */ |
51 class YamlException implements Exception { | 63 class YamlException implements Exception { |
52 String msg; | 64 String msg; |
53 | 65 |
54 YamlException(this.msg); | 66 YamlException(this.msg); |
55 | 67 |
56 String toString() => msg; | 68 String toString() => msg; |
57 } | 69 } |
OLD | NEW |