| 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.composer; | 5 library yaml.composer; |
| 6 | 6 |
| 7 import 'package:source_maps/source_maps.dart'; | |
| 8 | |
| 9 import 'model.dart'; | 7 import 'model.dart'; |
| 10 import 'visitor.dart'; | 8 import 'visitor.dart'; |
| 11 import 'yaml_exception.dart'; | 9 import 'yaml_exception.dart'; |
| 12 | 10 |
| 13 /// Takes a parsed YAML document (what the spec calls the "serialization tree") | 11 /// Takes a parsed YAML document (what the spec calls the "serialization tree") |
| 14 /// and resolves aliases, resolves tags, and parses scalars to produce the | 12 /// and resolves aliases, resolves tags, and parses scalars to produce the |
| 15 /// "representation graph". | 13 /// "representation graph". |
| 16 class Composer extends Visitor { | 14 class Composer extends Visitor { |
| 17 /// The root node of the serialization tree. | 15 /// The root node of the serialization tree. |
| 18 final Node _root; | 16 final Node _root; |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 return new ScalarNode(Tag.yaml("float"), scalar.span, value: double.NAN); | 171 return new ScalarNode(Tag.yaml("float"), scalar.span, value: double.NAN); |
| 174 } | 172 } |
| 175 | 173 |
| 176 return null; | 174 return null; |
| 177 } | 175 } |
| 178 | 176 |
| 179 /// Parses a string scalar. | 177 /// Parses a string scalar. |
| 180 ScalarNode parseString(ScalarNode scalar) => | 178 ScalarNode parseString(ScalarNode scalar) => |
| 181 new ScalarNode(Tag.yaml("str"), scalar.span, value: scalar.content); | 179 new ScalarNode(Tag.yaml("str"), scalar.span, value: scalar.content); |
| 182 } | 180 } |
| OLD | NEW |