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

Side by Side Diff: lib/compiler/implementation/scanner/array_based_scanner.dart

Issue 10091033: Add extends clause to the type parameter for AbstractScanner. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | lib/compiler/implementation/scanner/scanner.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 class ArrayBasedScanner<S> extends AbstractScanner<S> { 5 class ArrayBasedScanner<S extends SourceString> extends AbstractScanner<S> {
6 int get charOffset() => byteOffset + extraCharOffset; 6 int get charOffset() => byteOffset + extraCharOffset;
7 final Token tokens; 7 final Token tokens;
8 Token tail; 8 Token tail;
9 int tokenStart; 9 int tokenStart;
10 int byteOffset; 10 int byteOffset;
11 11
12 /** Since the input is UTF8, some characters are represented by more 12 /** Since the input is UTF8, some characters are represented by more
13 * than one byte. [extraCharOffset] tracks the difference. */ 13 * than one byte. [extraCharOffset] tracks the difference. */
14 int extraCharOffset; 14 int extraCharOffset;
15 Link<BeginGroupToken> groupingStack = const EmptyLink<BeginGroupToken>(); 15 Link<BeginGroupToken> groupingStack = const EmptyLink<BeginGroupToken>();
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 162
163 void discardOpenLt() { 163 void discardOpenLt() {
164 while (!groupingStack.isEmpty() && groupingStack.head.kind === LT_TOKEN) { 164 while (!groupingStack.isEmpty() && groupingStack.head.kind === LT_TOKEN) {
165 groupingStack = groupingStack.tail; 165 groupingStack = groupingStack.tail;
166 } 166 }
167 } 167 }
168 168
169 // TODO(ahe): make class abstract instead of adding an abstract method. 169 // TODO(ahe): make class abstract instead of adding an abstract method.
170 abstract peek(); 170 abstract peek();
171 } 171 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/scanner/scanner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698