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

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: code review Created 6 years, 5 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
« no previous file with comments | « pkg/yaml/lib/src/yaml_node_wrapper.dart ('k') | pkg/yaml/pubspec.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 'package:string_scanner/string_scanner.dart'; 7 import 'package:string_scanner/string_scanner.dart';
8 8
9 import 'src/composer.dart'; 9 import 'src/composer.dart';
10 import 'src/constructor.dart'; 10 import 'src/constructor.dart';
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 var pair; 65 var pair;
66 try { 66 try {
67 pair = new Parser(yaml, sourceName).l_yamlStream(); 67 pair = new Parser(yaml, sourceName).l_yamlStream();
68 } on StringScannerException catch (error) { 68 } on StringScannerException catch (error) {
69 throw new YamlException(error.message, error.span); 69 throw new YamlException(error.message, error.span);
70 } 70 }
71 71
72 var nodes = pair.first 72 var nodes = pair.first
73 .map((doc) => new Constructor(new Composer(doc).compose()).construct()) 73 .map((doc) => new Constructor(new Composer(doc).compose()).construct())
74 .toList(); 74 .toList();
75 return new YamlList(nodes, pair.last); 75 return new YamlList.internal(nodes, pair.last);
76 } 76 }
OLDNEW
« no previous file with comments | « pkg/yaml/lib/src/yaml_node_wrapper.dart ('k') | pkg/yaml/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698