| 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 #library("yaml"); | 5 library yaml; |
| 6 | 6 |
| 7 #import('dart:math', prefix: 'Math'); | 7 import 'dart:math' as Math; |
| 8 | 8 |
| 9 #import("deep_equals.dart"); | 9 import 'deep_equals.dart'; |
| 10 | 10 |
| 11 #source("yaml_map.dart"); | 11 part 'yaml_map.dart'; |
| 12 #source("model.dart"); | 12 part 'model.dart'; |
| 13 #source("parser.dart"); | 13 part 'parser.dart'; |
| 14 #source("visitor.dart"); | 14 part 'visitor.dart'; |
| 15 #source("composer.dart"); | 15 part 'composer.dart'; |
| 16 #source("constructor.dart"); | 16 part 'constructor.dart'; |
| 17 | 17 |
| 18 /** | 18 /** |
| 19 * Loads a single document from a YAML string. If the string contains more than | 19 * Loads a single document from a YAML string. If the string contains more than |
| 20 * one document, this throws an error. | 20 * one document, this throws an error. |
| 21 * | 21 * |
| 22 * The return value is mostly normal Dart objects. However, since YAML mappings | 22 * The return value is mostly normal Dart objects. However, since YAML mappings |
| 23 * support some key types that the default Dart map implementation doesn't | 23 * support some key types that the default Dart map implementation doesn't |
| 24 * (null, NaN, booleans, lists, and maps), all maps in the returned document are | 24 * (null, NaN, booleans, lists, and maps), all maps in the returned document are |
| 25 * YamlMaps. These have a few small behavioral differences from the default Map | 25 * YamlMaps. These have a few small behavioral differences from the default Map |
| 26 * implementation; for details, see the YamlMap class. | 26 * implementation; for details, see the YamlMap class. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 48 } | 48 } |
| 49 | 49 |
| 50 /** An error thrown by the YAML processor. */ | 50 /** An error thrown by the YAML processor. */ |
| 51 class YamlException implements Exception { | 51 class YamlException implements Exception { |
| 52 String msg; | 52 String msg; |
| 53 | 53 |
| 54 YamlException(this.msg); | 54 YamlException(this.msg); |
| 55 | 55 |
| 56 String toString() => msg; | 56 String toString() => msg; |
| 57 } | 57 } |
| OLD | NEW |