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

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

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 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 | « packages/yaml/lib/src/yaml_node_wrapper.dart ('k') | packages/yaml/libyaml-license.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « packages/yaml/lib/src/yaml_node_wrapper.dart ('k') | packages/yaml/libyaml-license.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698