| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 source_maps.source_map_span; | 5 library source_maps.source_map_span; |
| 6 | 6 |
| 7 import 'package:source_span/source_span.dart'; | 7 import 'package:source_span/source_span.dart'; |
| 8 | 8 |
| 9 /// A [SourceSpan] for spans coming from or being written to source maps. | 9 /// A [SourceSpan] for spans coming from or being written to source maps. |
| 10 /// | 10 /// |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 /// A wrapper aruond a [FileSpan] that implements [SourceMapSpan]. | 38 /// A wrapper aruond a [FileSpan] that implements [SourceMapSpan]. |
| 39 class SourceMapFileSpan implements SourceMapSpan, FileSpan { | 39 class SourceMapFileSpan implements SourceMapSpan, FileSpan { |
| 40 final FileSpan _inner; | 40 final FileSpan _inner; |
| 41 final bool isIdentifier; | 41 final bool isIdentifier; |
| 42 | 42 |
| 43 SourceFile get file => _inner.file; | 43 SourceFile get file => _inner.file; |
| 44 FileLocation get start => _inner.start; | 44 FileLocation get start => _inner.start; |
| 45 FileLocation get end => _inner.end; | 45 FileLocation get end => _inner.end; |
| 46 String get text => _inner.text; | 46 String get text => _inner.text; |
| 47 String get context => _inner.context; |
| 47 Uri get sourceUrl => _inner.sourceUrl; | 48 Uri get sourceUrl => _inner.sourceUrl; |
| 48 int get length => _inner.length; | 49 int get length => _inner.length; |
| 49 | 50 |
| 50 SourceMapFileSpan(this._inner, {this.isIdentifier: false}); | 51 SourceMapFileSpan(this._inner, {this.isIdentifier: false}); |
| 51 | 52 |
| 52 int compareTo(SourceSpan other) => _inner.compareTo(other); | 53 int compareTo(SourceSpan other) => _inner.compareTo(other); |
| 53 SourceSpan union(SourceSpan other) => _inner.union(other); | 54 SourceSpan union(SourceSpan other) => _inner.union(other); |
| 54 FileSpan expand(FileSpan other) => _inner.expand(other); | 55 FileSpan expand(FileSpan other) => _inner.expand(other); |
| 55 String message(String message, {color}) => | 56 String message(String message, {color}) => |
| 56 _inner.message(message, color: color); | 57 _inner.message(message, color: color); |
| 57 String toString() => _inner.toString() | 58 String toString() => _inner.toString() |
| 58 .replaceAll("FileSpan", "SourceMapFileSpan"); | 59 .replaceAll("FileSpan", "SourceMapFileSpan"); |
| 59 } | 60 } |
| OLD | NEW |