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 /// This file contains the node classes for the internal representations of YAML | 5 /// This file contains the node classes for the internal representations of YAML |
6 /// documents. These nodes are used for both the serialization tree and the | 6 /// documents. These nodes are used for both the serialization tree and the |
7 /// representation graph. | 7 /// representation graph. |
8 library model; | 8 library model; |
9 | 9 |
10 import 'model.dart'; | |
11 import 'parser.dart'; | 10 import 'parser.dart'; |
12 import 'utils.dart'; | 11 import 'utils.dart'; |
13 import 'visitor.dart'; | 12 import 'visitor.dart'; |
14 import 'yaml_exception.dart'; | 13 import 'yaml_exception.dart'; |
15 | 14 |
16 /// A tag that indicates the type of a YAML node. | 15 /// A tag that indicates the type of a YAML node. |
17 class Tag { | 16 class Tag { |
18 // TODO(nweiz): it would better match the semantics of the spec if there were | 17 // TODO(nweiz): it would better match the semantics of the spec if there were |
19 // a singleton instance of this class for each tag. | 18 // a singleton instance of this class for each tag. |
20 | 19 |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 var strContent = content.keys | 227 var strContent = content.keys |
229 .map((k) => '${k}: ${content[k]}') | 228 .map((k) => '${k}: ${content[k]}') |
230 .join(', '); | 229 .join(', '); |
231 return '$tag {$strContent}'; | 230 return '$tag {$strContent}'; |
232 } | 231 } |
233 | 232 |
234 int get hashCode => super.hashCode ^ hashCodeFor(content); | 233 int get hashCode => super.hashCode ^ hashCodeFor(content); |
235 | 234 |
236 visit(Visitor v) => v.visitMapping(this); | 235 visit(Visitor v) => v.visitMapping(this); |
237 } | 236 } |
OLD | NEW |