| Index: packages/yaml/lib/yaml.dart
|
| diff --git a/yaml/lib/yaml.dart b/packages/yaml/lib/yaml.dart
|
| similarity index 93%
|
| rename from yaml/lib/yaml.dart
|
| rename to packages/yaml/lib/yaml.dart
|
| index aa120ef9790fc52daa793888010bb1455896f813..0d48deae9590ecf800d4b19122d73f4468790216 100644
|
| --- a/yaml/lib/yaml.dart
|
| +++ b/packages/yaml/lib/yaml.dart
|
| @@ -81,15 +81,17 @@ YamlDocument loadYamlDocument(String yaml, {sourceUrl}) {
|
| YamlList loadYamlStream(String yaml, {sourceUrl}) {
|
| var loader = new Loader(yaml, sourceUrl: sourceUrl);
|
|
|
| - var documents = [];
|
| + var documents = <YamlDocument>[];
|
| var document = loader.load();
|
| while (document != null) {
|
| documents.add(document);
|
| document = loader.load();
|
| }
|
|
|
| + // TODO(jmesserly): the type on the `document` parameter is a workaround for:
|
| + // https://github.com/dart-lang/dev_compiler/issues/203
|
| return new YamlList.internal(
|
| - documents.map((document) => document.contents).toList(),
|
| + documents.map((YamlDocument document) => document.contents).toList(),
|
| loader.span,
|
| CollectionStyle.ANY);
|
| }
|
| @@ -101,7 +103,7 @@ YamlList loadYamlStream(String yaml, {sourceUrl}) {
|
| List<YamlDocument> loadYamlDocuments(String yaml, {sourceUrl}) {
|
| var loader = new Loader(yaml, sourceUrl: sourceUrl);
|
|
|
| - var documents = [];
|
| + var documents = <YamlDocument>[];
|
| var document = loader.load();
|
| while (document != null) {
|
| documents.add(document);
|
|
|