| 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 fasta.scanner.precedence; | 5 library fasta.scanner.precedence; |
| 6 | 6 |
| 7 import '../../scanner/token.dart'; | 7 import '../../scanner/token.dart'; |
| 8 import 'token_constants.dart'; | 8 import 'token_constants.dart'; |
| 9 | 9 |
| 10 class PrecedenceInfo implements TokenType { | 10 class PrecedenceInfo implements TokenType { |
| 11 final String value; | 11 final String value; |
| 12 final String name; | 12 final String name; |
| 13 final int precedence; | 13 final int precedence; |
| 14 final int kind; | 14 final int kind; |
| 15 final bool isOperator; | 15 final bool isOperator; |
| 16 final bool isUserDefinableOperator; | 16 final bool isUserDefinableOperator; |
| 17 | 17 |
| 18 const PrecedenceInfo(this.value, this.name, this.precedence, this.kind, | 18 const PrecedenceInfo(this.value, this.name, this.precedence, this.kind, |
| 19 {this.isOperator: false, this.isUserDefinableOperator: false}); | 19 {this.isOperator: false, this.isUserDefinableOperator: false}); |
| 20 | 20 |
| 21 toString() => 'PrecedenceInfo($value, $precedence, $kind)'; | 21 toString() => 'PrecedenceInfo($value, $name, $precedence, $kind)'; |
| 22 | 22 |
| 23 static const List<PrecedenceInfo> all = const <PrecedenceInfo>[ | 23 static const List<PrecedenceInfo> all = const <PrecedenceInfo>[ |
| 24 BACKPING_INFO, | 24 BACKPING_INFO, |
| 25 BACKSLASH_INFO, | 25 BACKSLASH_INFO, |
| 26 PERIOD_PERIOD_PERIOD_INFO, | 26 PERIOD_PERIOD_PERIOD_INFO, |
| 27 PERIOD_PERIOD_INFO, | 27 PERIOD_PERIOD_INFO, |
| 28 BANG_INFO, | 28 BANG_INFO, |
| 29 COLON_INFO, | 29 COLON_INFO, |
| 30 INDEX_INFO, | 30 INDEX_INFO, |
| 31 MINUS_MINUS_INFO, | 31 MINUS_MINUS_INFO, |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 STRING_INTERPOLATION_IDENTIFIER_TOKEN); | 389 STRING_INTERPOLATION_IDENTIFIER_TOKEN); |
| 390 | 390 |
| 391 const PrecedenceInfo HEXADECIMAL_INFO = | 391 const PrecedenceInfo HEXADECIMAL_INFO = |
| 392 const PrecedenceInfo('hexadecimal', 'HEXADECIMAL', 0, HEXADECIMAL_TOKEN); | 392 const PrecedenceInfo('hexadecimal', 'HEXADECIMAL', 0, HEXADECIMAL_TOKEN); |
| 393 | 393 |
| 394 const PrecedenceInfo SINGLE_LINE_COMMENT_INFO = | 394 const PrecedenceInfo SINGLE_LINE_COMMENT_INFO = |
| 395 const PrecedenceInfo('comment', 'SINGLE_LINE_COMMENT', 0, COMMENT_TOKEN); | 395 const PrecedenceInfo('comment', 'SINGLE_LINE_COMMENT', 0, COMMENT_TOKEN); |
| 396 | 396 |
| 397 const PrecedenceInfo MULTI_LINE_COMMENT_INFO = | 397 const PrecedenceInfo MULTI_LINE_COMMENT_INFO = |
| 398 const PrecedenceInfo('comment', 'MULTI_LINE_COMMENT', 0, COMMENT_TOKEN); | 398 const PrecedenceInfo('comment', 'MULTI_LINE_COMMENT', 0, COMMENT_TOKEN); |
| OLD | NEW |