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

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

Issue 11191078: Make hashCode a getter and not a method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 years, 2 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 const int EOF_TOKEN = 0; 5 const int EOF_TOKEN = 0;
6 6
7 const int KEYWORD_TOKEN = $k; 7 const int KEYWORD_TOKEN = $k;
8 const int IDENTIFIER_TOKEN = $a; 8 const int IDENTIFIER_TOKEN = $a;
9 const int BAD_INPUT_TOKEN = $X; 9 const int BAD_INPUT_TOKEN = $X;
10 const int DOUBLE_TOKEN = $d; 10 const int DOUBLE_TOKEN = $d;
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 bool isEmpty(); 193 bool isEmpty();
194 194
195 bool isPrivate(); 195 bool isPrivate();
196 } 196 }
197 197
198 class StringWrapper implements SourceString { 198 class StringWrapper implements SourceString {
199 final String stringValue; 199 final String stringValue;
200 200
201 const StringWrapper(String this.stringValue); 201 const StringWrapper(String this.stringValue);
202 202
203 int hashCode() => stringValue.hashCode(); 203 int get hashCode => stringValue.hashCode;
204 204
205 bool operator ==(other) { 205 bool operator ==(other) {
206 return other is SourceString && toString() == other.slowToString(); 206 return other is SourceString && toString() == other.slowToString();
207 } 207 }
208 208
209 Iterator<int> iterator() => new StringCodeIterator(stringValue); 209 Iterator<int> iterator() => new StringCodeIterator(stringValue);
210 210
211 void printOn(StringBuffer sb) { 211 void printOn(StringBuffer sb) {
212 sb.add(stringValue); 212 sb.add(stringValue);
213 } 213 }
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 493
494 const PrecedenceInfo HEXADECIMAL_INFO = 494 const PrecedenceInfo HEXADECIMAL_INFO =
495 const PrecedenceInfo(const SourceString('hexadecimal'), 0, HEXADECIMAL_TOKEN); 495 const PrecedenceInfo(const SourceString('hexadecimal'), 0, HEXADECIMAL_TOKEN);
496 496
497 const PrecedenceInfo COMMENT_INFO = 497 const PrecedenceInfo COMMENT_INFO =
498 const PrecedenceInfo(const SourceString('comment'), 0, COMMENT_TOKEN); 498 const PrecedenceInfo(const SourceString('comment'), 0, COMMENT_TOKEN);
499 499
500 // For reporting lexical errors. 500 // For reporting lexical errors.
501 const PrecedenceInfo ERROR_INFO = 501 const PrecedenceInfo ERROR_INFO =
502 const PrecedenceInfo(const SourceString('?'), 0, UNKNOWN_TOKEN); 502 const PrecedenceInfo(const SourceString('?'), 0, UNKNOWN_TOKEN);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698