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

Side by Side Diff: dart/sdk/lib/_internal/compiler/implementation/scanner/token.dart

Issue 12294028: Fix warnings spotted by dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 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
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 part of scanner; 5 part of scanner;
6 6
7 const int EOF_TOKEN = 0; 7 const int EOF_TOKEN = 0;
8 8
9 const int KEYWORD_TOKEN = $k; 9 const int KEYWORD_TOKEN = $k;
10 const int IDENTIFIER_TOKEN = $a; 10 const int IDENTIFIER_TOKEN = $a;
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 int get hashCode => stringValue.hashCode; 213 int get hashCode => stringValue.hashCode;
214 214
215 bool operator ==(other) { 215 bool operator ==(other) {
216 return other is SourceString && toString() == other.slowToString(); 216 return other is SourceString && toString() == other.slowToString();
217 } 217 }
218 218
219 Iterator<int> get iterator => new StringCodeIterator(stringValue); 219 Iterator<int> get iterator => new StringCodeIterator(stringValue);
220 220
221 void printOn(StringBuffer sb) { 221 void printOn(StringBuffer sb) {
222 sb.add(stringValue); 222 sb.write(stringValue);
223 } 223 }
224 224
225 String toString() => stringValue; 225 String toString() => stringValue;
226 226
227 String slowToString() => stringValue; 227 String slowToString() => stringValue;
228 228
229 SourceString copyWithoutQuotes(int initial, int terminal) { 229 SourceString copyWithoutQuotes(int initial, int terminal) {
230 assert(0 <= initial); 230 assert(0 <= initial);
231 assert(0 <= terminal); 231 assert(0 <= terminal);
232 assert(initial + terminal <= stringValue.length); 232 assert(initial + terminal <= stringValue.length);
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 521
522 const PrecedenceInfo HEXADECIMAL_INFO = 522 const PrecedenceInfo HEXADECIMAL_INFO =
523 const PrecedenceInfo(const SourceString('hexadecimal'), 0, HEXADECIMAL_TOKEN); 523 const PrecedenceInfo(const SourceString('hexadecimal'), 0, HEXADECIMAL_TOKEN);
524 524
525 const PrecedenceInfo COMMENT_INFO = 525 const PrecedenceInfo COMMENT_INFO =
526 const PrecedenceInfo(const SourceString('comment'), 0, COMMENT_TOKEN); 526 const PrecedenceInfo(const SourceString('comment'), 0, COMMENT_TOKEN);
527 527
528 // For reporting lexical errors. 528 // For reporting lexical errors.
529 const PrecedenceInfo ERROR_INFO = 529 const PrecedenceInfo ERROR_INFO =
530 const PrecedenceInfo(const SourceString('?'), 0, UNKNOWN_TOKEN); 530 const PrecedenceInfo(const SourceString('?'), 0, UNKNOWN_TOKEN);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698