| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 /** | 5 /** |
| 6 * An object used by the scanner to read the characters to be scanned. | 6 * An object used by the scanner to read the characters to be scanned. |
| 7 */ | 7 */ |
| 8 abstract class CharacterReader { | 8 abstract class CharacterReader { |
| 9 /** | 9 /** |
| 10 * The current offset relative to the beginning of the source. Return the | 10 * The current offset relative to the beginning of the source. Return the |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 129 |
| 130 @override | 130 @override |
| 131 int get offset => _offsetDelta + super.offset; | 131 int get offset => _offsetDelta + super.offset; |
| 132 | 132 |
| 133 @override | 133 @override |
| 134 void set offset(int offset) { | 134 void set offset(int offset) { |
| 135 super.offset = offset - _offsetDelta; | 135 super.offset = offset - _offsetDelta; |
| 136 } | 136 } |
| 137 | 137 |
| 138 @override | 138 @override |
| 139 String getContents() => super.getContents().substring(_offsetDelta); | 139 String getContents() => super.getContents(); |
| 140 | 140 |
| 141 @override | 141 @override |
| 142 String getString(int start, int endDelta) => | 142 String getString(int start, int endDelta) => |
| 143 super.getString(start - _offsetDelta, endDelta); | 143 super.getString(start - _offsetDelta, endDelta); |
| 144 } | 144 } |
| OLD | NEW |