| 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.yaml_node; | 5 library yaml.yaml_node; |
| 6 | 6 |
| 7 import 'dart:collection' as collection; | 7 import 'dart:collection' as collection; |
| 8 | 8 |
| 9 import 'package:collection/collection.dart'; | 9 import 'package:collection/collection.dart'; |
| 10 import 'package:source_span/source_span.dart'; | 10 import 'package:source_span/source_span.dart'; |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 /// | 159 /// |
| 160 /// [sourceUrl] may be either a [String], a [Uri], or `null`. | 160 /// [sourceUrl] may be either a [String], a [Uri], or `null`. |
| 161 YamlScalar.wrap(this.value, {sourceUrl}) | 161 YamlScalar.wrap(this.value, {sourceUrl}) |
| 162 : style = ScalarStyle.ANY { | 162 : style = ScalarStyle.ANY { |
| 163 _span = new NullSpan(sourceUrl); | 163 _span = new NullSpan(sourceUrl); |
| 164 } | 164 } |
| 165 | 165 |
| 166 /// Users of the library should not use this constructor. | 166 /// Users of the library should not use this constructor. |
| 167 YamlScalar.internal(this.value, ScalarEvent scalar) | 167 YamlScalar.internal(this.value, ScalarEvent scalar) |
| 168 : style = scalar.style { | 168 : style = scalar.style { |
| 169 _span = span; | 169 _span = scalar.span; |
| 170 } | 170 } |
| 171 | 171 |
| 172 /// Users of the library should not use this constructor. | 172 /// Users of the library should not use this constructor. |
| 173 YamlScalar.internalWithSpan(this.value, SourceSpan span) | 173 YamlScalar.internalWithSpan(this.value, SourceSpan span) |
| 174 : style = ScalarStyle.ANY { | 174 : style = ScalarStyle.ANY { |
| 175 _span = span; | 175 _span = span; |
| 176 } | 176 } |
| 177 | 177 |
| 178 String toString() => value.toString(); | 178 String toString() => value.toString(); |
| 179 } | 179 } |
| 180 | 180 |
| 181 /// Sets the source span of a [YamlNode]. | 181 /// Sets the source span of a [YamlNode]. |
| 182 /// | 182 /// |
| 183 /// This method is not exposed publicly. | 183 /// This method is not exposed publicly. |
| 184 void setSpan(YamlNode node, SourceSpan span) { | 184 void setSpan(YamlNode node, SourceSpan span) { |
| 185 node._span = span; | 185 node._span = span; |
| 186 } | 186 } |
| OLD | NEW |