| 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 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 133 |
| 134 /** Gives a [SourceString] that is not including the [initial] first and | 134 /** Gives a [SourceString] that is not including the [initial] first and |
| 135 * [terminal] last characters. This is only intended to be used to remove | 135 * [terminal] last characters. This is only intended to be used to remove |
| 136 * quotes from string literals (including an initial '@' for raw strings). | 136 * quotes from string literals (including an initial '@' for raw strings). |
| 137 */ | 137 */ |
| 138 SourceString copyWithoutQuotes(int initial, int terminal); | 138 SourceString copyWithoutQuotes(int initial, int terminal); |
| 139 | 139 |
| 140 String get stringValue(); | 140 String get stringValue(); |
| 141 | 141 |
| 142 String slowToString(); | 142 String slowToString(); |
| 143 |
| 143 bool isEmpty(); | 144 bool isEmpty(); |
| 144 } | 145 } |
| 145 | 146 |
| 146 class StringWrapper implements SourceString { | 147 class StringWrapper implements SourceString { |
| 147 final String stringValue; | 148 final String stringValue; |
| 148 | 149 |
| 149 const StringWrapper(String this.stringValue); | 150 const StringWrapper(String this.stringValue); |
| 150 | 151 |
| 151 int hashCode() => stringValue.hashCode(); | 152 int hashCode() => stringValue.hashCode(); |
| 152 | 153 |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 final PrecedenceInfo STRING_INTERPOLATION_INFO = | 426 final PrecedenceInfo STRING_INTERPOLATION_INFO = |
| 426 const PrecedenceInfo(const SourceString('\${'), 0, | 427 const PrecedenceInfo(const SourceString('\${'), 0, |
| 427 STRING_INTERPOLATION_TOKEN); | 428 STRING_INTERPOLATION_TOKEN); |
| 428 | 429 |
| 429 final PrecedenceInfo HEXADECIMAL_INFO = | 430 final PrecedenceInfo HEXADECIMAL_INFO = |
| 430 const PrecedenceInfo(const SourceString('hexadecimal'), 0, HEXADECIMAL_TOKEN); | 431 const PrecedenceInfo(const SourceString('hexadecimal'), 0, HEXADECIMAL_TOKEN); |
| 431 | 432 |
| 432 // For reporting lexical errors. | 433 // For reporting lexical errors. |
| 433 final PrecedenceInfo ERROR_INFO = | 434 final PrecedenceInfo ERROR_INFO = |
| 434 const PrecedenceInfo(const SourceString('?'), 0, UNKNOWN_TOKEN); | 435 const PrecedenceInfo(const SourceString('?'), 0, UNKNOWN_TOKEN); |
| OLD | NEW |