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

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

Issue 10697003: Various token issues fixed in the compiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Unit tests updated, co19 status updated. Created 8 years, 5 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 final int EOF_TOKEN = 0; 5 final int EOF_TOKEN = 0;
6 6
7 final int KEYWORD_TOKEN = $k; 7 final int KEYWORD_TOKEN = $k;
8 final int IDENTIFIER_TOKEN = $a; 8 final int IDENTIFIER_TOKEN = $a;
9 final int DOUBLE_TOKEN = $d; 9 final int DOUBLE_TOKEN = $d;
10 final int INT_TOKEN = $i; 10 final int INT_TOKEN = $i;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 String toString() => info.value.toString(); 132 String toString() => info.value.toString();
133 133
134 /** 134 /**
135 * The text parsed by this token. 135 * The text parsed by this token.
136 */ 136 */
137 String slowToString() => toString(); 137 String slowToString() => toString();
138 138
139 /** 139 /**
140 * The number of characters parsed by this token. 140 * The number of characters parsed by this token.
141 */ 141 */
142 int get slowCharLength() => slowToString().length; 142 int get slowCharCount() => slowToString().length;
143 } 143 }
144 144
145 /** 145 /**
146 * A keyword token. 146 * A keyword token.
147 */ 147 */
148 class KeywordToken extends Token { 148 class KeywordToken extends Token {
149 final Keyword value; 149 final Keyword value;
150 String get stringValue() => value.syntax; 150 String get stringValue() => value.syntax;
151 151
152 KeywordToken(Keyword value, int charOffset) 152 KeywordToken(Keyword value, int charOffset)
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 491
492 final PrecedenceInfo HEXADECIMAL_INFO = 492 final PrecedenceInfo HEXADECIMAL_INFO =
493 const PrecedenceInfo(const SourceString('hexadecimal'), 0, HEXADECIMAL_TOKEN); 493 const PrecedenceInfo(const SourceString('hexadecimal'), 0, HEXADECIMAL_TOKEN);
494 494
495 final PrecedenceInfo COMMENT_INFO = 495 final PrecedenceInfo COMMENT_INFO =
496 const PrecedenceInfo(const SourceString('comment'), 0, COMMENT_TOKEN); 496 const PrecedenceInfo(const SourceString('comment'), 0, COMMENT_TOKEN);
497 497
498 // For reporting lexical errors. 498 // For reporting lexical errors.
499 final PrecedenceInfo ERROR_INFO = 499 final PrecedenceInfo ERROR_INFO =
500 const PrecedenceInfo(const SourceString('?'), 0, UNKNOWN_TOKEN); 500 const PrecedenceInfo(const SourceString('?'), 0, UNKNOWN_TOKEN);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698