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