| 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 library fasta.scanner.token; | 5 library fasta.scanner.token; |
| 6 | 6 |
| 7 import '../../scanner/token.dart' as analyzer; | 7 import '../../scanner/token.dart' as analyzer; |
| 8 import '../../scanner/token.dart' show TokenType; | 8 import '../../scanner/token.dart' show TokenType; |
| 9 | 9 |
| 10 import 'token_constants.dart' show IDENTIFIER_TOKEN; | 10 import 'token_constants.dart' show IDENTIFIER_TOKEN; |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 /** | 325 /** |
| 326 * A keyword token. | 326 * A keyword token. |
| 327 */ | 327 */ |
| 328 class KeywordToken extends Token implements analyzer.KeywordTokenWithComment { | 328 class KeywordToken extends Token implements analyzer.KeywordTokenWithComment { |
| 329 final analyzer.Keyword keyword; | 329 final analyzer.Keyword keyword; |
| 330 | 330 |
| 331 KeywordToken(this.keyword, int charOffset) : super(charOffset); | 331 KeywordToken(this.keyword, int charOffset) : super(charOffset); |
| 332 | 332 |
| 333 TokenType get info => keyword.info; | 333 TokenType get info => keyword.info; |
| 334 | 334 |
| 335 String get lexeme => keyword.syntax; | 335 String get lexeme => keyword.lexeme; |
| 336 | 336 |
| 337 String get stringValue => keyword.syntax; | 337 String get stringValue => keyword.lexeme; |
| 338 | 338 |
| 339 bool isIdentifier() => keyword.isPseudo || keyword.isBuiltIn; | 339 bool isIdentifier() => keyword.isPseudo || keyword.isBuiltIn; |
| 340 | 340 |
| 341 bool get isPseudo => keyword.isPseudo; | 341 bool get isPseudo => keyword.isPseudo; |
| 342 | 342 |
| 343 bool get isBuiltInIdentifier => keyword.isBuiltIn; | 343 bool get isBuiltInIdentifier => keyword.isBuiltIn; |
| 344 | 344 |
| 345 String toString() => "KeywordToken($lexeme)"; | 345 String toString() => "KeywordToken($lexeme)"; |
| 346 | 346 |
| 347 @override | 347 @override |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 identical(value, "<=") || | 682 identical(value, "<=") || |
| 683 identical(value, "<") || | 683 identical(value, "<") || |
| 684 identical(value, "&") || | 684 identical(value, "&") || |
| 685 identical(value, "^") || | 685 identical(value, "^") || |
| 686 identical(value, "|"); | 686 identical(value, "|"); |
| 687 } | 687 } |
| 688 | 688 |
| 689 bool isTernaryOperator(String value) => identical(value, "[]="); | 689 bool isTernaryOperator(String value) => identical(value, "[]="); |
| 690 | 690 |
| 691 bool isMinusOperator(String value) => identical(value, "-"); | 691 bool isMinusOperator(String value) => identical(value, "-"); |
| OLD | NEW |