| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |