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

Side by Side Diff: pkg/yaml/lib/yaml.dart

Issue 343063002: Add new constructors to YamlNode subclasses. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: improve DummySpan.getLocationString Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 'src/composer.dart'; 7 import 'src/composer.dart';
8 import 'src/constructor.dart'; 8 import 'src/constructor.dart';
9 import 'src/parser.dart'; 9 import 'src/parser.dart';
10 import 'src/yaml_exception.dart'; 10 import 'src/yaml_exception.dart';
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 var pair; 62 var pair;
63 try { 63 try {
64 pair = new Parser(yaml, sourceName).l_yamlStream(); 64 pair = new Parser(yaml, sourceName).l_yamlStream();
65 } on FormatException catch (error) { 65 } on FormatException catch (error) {
66 throw new YamlException(error.toString()); 66 throw new YamlException(error.toString());
67 } 67 }
68 68
69 var nodes = pair.first 69 var nodes = pair.first
70 .map((doc) => new Constructor(new Composer(doc).compose()).construct()) 70 .map((doc) => new Constructor(new Composer(doc).compose()).construct())
71 .toList(); 71 .toList();
72 return new YamlList(nodes, pair.last); 72 return new YamlList.internal(nodes, pair.last);
73 } 73 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698