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

Unified Diff: pkg/yaml/lib/yaml.dart

Issue 14103026: Restructure the yaml package. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 | « pkg/yaml/lib/visitor.dart ('k') | pkg/yaml/lib/yaml_map.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/yaml/lib/yaml.dart
diff --git a/pkg/yaml/lib/yaml.dart b/pkg/yaml/lib/yaml.dart
index e905e767d4ced5bf8e1674abf3943b9ac231e416..94e3d4220f48c4ad3b0dff931a8029d116420770 100644
--- a/pkg/yaml/lib/yaml.dart
+++ b/pkg/yaml/lib/yaml.dart
@@ -24,17 +24,13 @@
/// }
library yaml;
-import 'dart:math' as Math;
-import 'dart:collection' show Queue;
+import 'src/composer.dart';
+import 'src/constructor.dart';
+import 'src/parser.dart';
+import 'src/yaml_exception.dart';
-import 'deep_equals.dart';
-
-part 'yaml_map.dart';
-part 'model.dart';
-part 'parser.dart';
-part 'visitor.dart';
-part 'composer.dart';
-part 'constructor.dart';
+export 'src/yaml_exception.dart';
+export 'src/yaml_map.dart';
/// Loads a single document from a YAML string. If the string contains more than
/// one document, this throws an error.
@@ -42,8 +38,8 @@ part 'constructor.dart';
/// The return value is mostly normal Dart objects. However, since YAML mappings
/// support some key types that the default Dart map implementation doesn't
/// (null, NaN, booleans, lists, and maps), all maps in the returned document
-/// are YamlMaps. These have a few small behavioral differences from the default
-/// Map implementation; for details, see the YamlMap class.
+/// are [YamlMap]s. These have a few small behavioral differences from the
+/// default Map implementation; for details, see the [YamlMap] class.
loadYaml(String yaml) {
var stream = loadYamlStream(yaml);
if (stream.length != 1) {
@@ -57,19 +53,10 @@ loadYaml(String yaml) {
/// The return value is mostly normal Dart objects. However, since YAML mappings
/// support some key types that the default Dart map implementation doesn't
/// (null, NaN, booleans, lists, and maps), all maps in the returned document
-/// are YamlMaps. These have a few small behavioral differences from the default
-/// Map implementation; for details, see the YamlMap class.
+/// are [YamlMap]s. These have a few small behavioral differences from the
+/// default Map implementation; for details, see the [YamlMap] class.
List loadYamlStream(String yaml) {
- return new _Parser(yaml).l_yamlStream()
- .map((doc) => new _Constructor(new _Composer(doc).compose()).construct())
+ return new Parser(yaml).l_yamlStream()
+ .map((doc) => new Constructor(new Composer(doc).compose()).construct())
.toList();
}
-
-/// An error thrown by the YAML processor.
-class YamlException implements Exception {
- String msg;
-
- YamlException(this.msg);
-
- String toString() => msg;
-}
« 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