OLD | NEW |
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 DOUBLE_TOKEN = $d; | 9 const int DOUBLE_TOKEN = $d; |
10 const int INT_TOKEN = $i; | 10 const int INT_TOKEN = $i; |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 const SourceString(String string); | 178 const SourceString(String string); |
179 | 179 |
180 void printOn(StringBuffer sb); | 180 void printOn(StringBuffer sb); |
181 | 181 |
182 /** Gives a [SourceString] that is not including the [initial] first and | 182 /** Gives a [SourceString] that is not including the [initial] first and |
183 * [terminal] last characters. This is only intended to be used to remove | 183 * [terminal] last characters. This is only intended to be used to remove |
184 * quotes from string literals (including an initial '@' for raw strings). | 184 * quotes from string literals (including an initial '@' for raw strings). |
185 */ | 185 */ |
186 SourceString copyWithoutQuotes(int initial, int terminal); | 186 SourceString copyWithoutQuotes(int initial, int terminal); |
187 | 187 |
188 String get stringValue(); | 188 String get stringValue; |
189 | 189 |
190 String slowToString(); | 190 String slowToString(); |
191 | 191 |
192 bool isEmpty(); | 192 bool isEmpty(); |
193 | 193 |
194 bool isPrivate(); | 194 bool isPrivate(); |
195 } | 195 } |
196 | 196 |
197 class StringWrapper implements SourceString { | 197 class StringWrapper implements SourceString { |
198 final String stringValue; | 198 final String stringValue; |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 | 494 |
495 const PrecedenceInfo HEXADECIMAL_INFO = | 495 const PrecedenceInfo HEXADECIMAL_INFO = |
496 const PrecedenceInfo(const SourceString('hexadecimal'), 0, HEXADECIMAL_TOKEN); | 496 const PrecedenceInfo(const SourceString('hexadecimal'), 0, HEXADECIMAL_TOKEN); |
497 | 497 |
498 const PrecedenceInfo COMMENT_INFO = | 498 const PrecedenceInfo COMMENT_INFO = |
499 const PrecedenceInfo(const SourceString('comment'), 0, COMMENT_TOKEN); | 499 const PrecedenceInfo(const SourceString('comment'), 0, COMMENT_TOKEN); |
500 | 500 |
501 // For reporting lexical errors. | 501 // For reporting lexical errors. |
502 const PrecedenceInfo ERROR_INFO = | 502 const PrecedenceInfo ERROR_INFO = |
503 const PrecedenceInfo(const SourceString('?'), 0, UNKNOWN_TOKEN); | 503 const PrecedenceInfo(const SourceString('?'), 0, UNKNOWN_TOKEN); |
OLD | NEW |