Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: pkg/front_end/lib/src/scanner/reader.dart

Issue 2900963009: enable analyzer scanner adapter generic method support (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/fasta/token_utils.dart ('k') | pkg/front_end/test/scanner_roundtrip_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698