| 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 part of scanner; | 5 part of scanner; |
| 6 | 6 |
| 7 const int EOF_TOKEN = 0; | 7 const int EOF_TOKEN = 0; |
| 8 | 8 |
| 9 const int KEYWORD_TOKEN = $k; | 9 const int KEYWORD_TOKEN = $k; |
| 10 const int IDENTIFIER_TOKEN = $a; | 10 const int IDENTIFIER_TOKEN = $a; |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 | 264 |
| 265 // TODO(sigmund): delete once we enable null-aware-operators by default. | 265 // TODO(sigmund): delete once we enable null-aware-operators by default. |
| 266 class UnsupportedNullAwareToken extends ErrorToken { | 266 class UnsupportedNullAwareToken extends ErrorToken { |
| 267 final String operator; | 267 final String operator; |
| 268 | 268 |
| 269 UnsupportedNullAwareToken(this.operator, int charOffset) | 269 UnsupportedNullAwareToken(this.operator, int charOffset) |
| 270 : super(charOffset); | 270 : super(charOffset); |
| 271 | 271 |
| 272 String toString() => "UnsupportedNullAwareToken($operator)"; | 272 String toString() => "UnsupportedNullAwareToken($operator)"; |
| 273 | 273 |
| 274 String get assertionMessage => "'$opreator' isn't supported without " | 274 String get assertionMessage => "'$operator' isn't supported without " |
| 275 "the --enable-null-aware-operators flag."; | 275 "the --enable-null-aware-operators flag."; |
| 276 | 276 |
| 277 int get charCount => operator.length; | 277 int get charCount => operator.length; |
| 278 } | 278 } |
| 279 | 279 |
| 280 class UnterminatedToken extends ErrorToken { | 280 class UnterminatedToken extends ErrorToken { |
| 281 final String start; | 281 final String start; |
| 282 final int endOffset; | 282 final int endOffset; |
| 283 | 283 |
| 284 UnterminatedToken(this.start, int charOffset, this.endOffset) | 284 UnterminatedToken(this.start, int charOffset, this.endOffset) |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 | 746 |
| 747 const PrecedenceInfo STRING_INTERPOLATION_IDENTIFIER_INFO = | 747 const PrecedenceInfo STRING_INTERPOLATION_IDENTIFIER_INFO = |
| 748 const PrecedenceInfo('\$', 0, | 748 const PrecedenceInfo('\$', 0, |
| 749 STRING_INTERPOLATION_IDENTIFIER_TOKEN); | 749 STRING_INTERPOLATION_IDENTIFIER_TOKEN); |
| 750 | 750 |
| 751 const PrecedenceInfo HEXADECIMAL_INFO = | 751 const PrecedenceInfo HEXADECIMAL_INFO = |
| 752 const PrecedenceInfo('hexadecimal', 0, HEXADECIMAL_TOKEN); | 752 const PrecedenceInfo('hexadecimal', 0, HEXADECIMAL_TOKEN); |
| 753 | 753 |
| 754 const PrecedenceInfo COMMENT_INFO = | 754 const PrecedenceInfo COMMENT_INFO = |
| 755 const PrecedenceInfo('comment', 0, COMMENT_TOKEN); | 755 const PrecedenceInfo('comment', 0, COMMENT_TOKEN); |
| OLD | NEW |