| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library dart2js.tokens.precedence.constants; | 5 library scanner.precedence; |
| 6 | 6 |
| 7 import 'precedence.dart' show PrecedenceInfo; | |
| 8 import 'token_constants.dart'; | 7 import 'token_constants.dart'; |
| 9 | 8 |
| 9 class PrecedenceInfo { |
| 10 final String value; |
| 11 final int precedence; |
| 12 final int kind; |
| 13 |
| 14 const PrecedenceInfo(this.value, this.precedence, this.kind); |
| 15 |
| 16 toString() => 'PrecedenceInfo($value, $precedence, $kind)'; |
| 17 } |
| 18 |
| 10 // TODO(ahe): The following are not tokens in Dart. | 19 // TODO(ahe): The following are not tokens in Dart. |
| 11 const PrecedenceInfo BACKPING_INFO = | 20 const PrecedenceInfo BACKPING_INFO = |
| 12 const PrecedenceInfo('`', 0, BACKPING_TOKEN); | 21 const PrecedenceInfo('`', 0, BACKPING_TOKEN); |
| 13 const PrecedenceInfo BACKSLASH_INFO = | 22 const PrecedenceInfo BACKSLASH_INFO = |
| 14 const PrecedenceInfo('\\', 0, BACKSLASH_TOKEN); | 23 const PrecedenceInfo('\\', 0, BACKSLASH_TOKEN); |
| 15 const PrecedenceInfo PERIOD_PERIOD_PERIOD_INFO = | 24 const PrecedenceInfo PERIOD_PERIOD_PERIOD_INFO = |
| 16 const PrecedenceInfo('...', 0, PERIOD_PERIOD_PERIOD_TOKEN); | 25 const PrecedenceInfo('...', 0, PERIOD_PERIOD_PERIOD_TOKEN); |
| 17 | 26 |
| 18 /** | 27 /** |
| 19 * The cascade operator has the lowest precedence of any operator | 28 * The cascade operator has the lowest precedence of any operator |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 const PrecedenceInfo('\${', 0, STRING_INTERPOLATION_TOKEN); | 189 const PrecedenceInfo('\${', 0, STRING_INTERPOLATION_TOKEN); |
| 181 | 190 |
| 182 const PrecedenceInfo STRING_INTERPOLATION_IDENTIFIER_INFO = | 191 const PrecedenceInfo STRING_INTERPOLATION_IDENTIFIER_INFO = |
| 183 const PrecedenceInfo('\$', 0, STRING_INTERPOLATION_IDENTIFIER_TOKEN); | 192 const PrecedenceInfo('\$', 0, STRING_INTERPOLATION_IDENTIFIER_TOKEN); |
| 184 | 193 |
| 185 const PrecedenceInfo HEXADECIMAL_INFO = | 194 const PrecedenceInfo HEXADECIMAL_INFO = |
| 186 const PrecedenceInfo('hexadecimal', 0, HEXADECIMAL_TOKEN); | 195 const PrecedenceInfo('hexadecimal', 0, HEXADECIMAL_TOKEN); |
| 187 | 196 |
| 188 const PrecedenceInfo COMMENT_INFO = | 197 const PrecedenceInfo COMMENT_INFO = |
| 189 const PrecedenceInfo('comment', 0, COMMENT_TOKEN); | 198 const PrecedenceInfo('comment', 0, COMMENT_TOKEN); |
| OLD | NEW |