| 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 | 8 |
| 9 import 'keyword.dart' show Keyword; | 9 import 'keyword.dart' show Keyword; |
| 10 | 10 |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 * Creates a lazy comment token. If [canonicalize] is true, the string | 467 * Creates a lazy comment token. If [canonicalize] is true, the string |
| 468 * is canonicalized before the token is created. | 468 * is canonicalized before the token is created. |
| 469 */ | 469 */ |
| 470 CommentToken.fromSubstring( | 470 CommentToken.fromSubstring( |
| 471 PrecedenceInfo info, String data, int start, int end, int charOffset, | 471 PrecedenceInfo info, String data, int start, int end, int charOffset, |
| 472 {bool canonicalize: false}) | 472 {bool canonicalize: false}) |
| 473 : super.fromSubstring(info, data, start, end, charOffset, | 473 : super.fromSubstring(info, data, start, end, charOffset, |
| 474 canonicalize: canonicalize); | 474 canonicalize: canonicalize); |
| 475 | 475 |
| 476 /** | 476 /** |
| 477 * Creates a non-lazy comment token. |
| 478 */ |
| 479 CommentToken.fromString(PrecedenceInfo info, String lexeme, int charOffset) |
| 480 : super.fromString(info, lexeme, charOffset); |
| 481 |
| 482 /** |
| 477 * Creates a lazy string token. If [asciiOnly] is false, the byte array | 483 * Creates a lazy string token. If [asciiOnly] is false, the byte array |
| 478 * is passed through a UTF-8 decoder. | 484 * is passed through a UTF-8 decoder. |
| 479 */ | 485 */ |
| 480 CommentToken.fromUtf8Bytes(PrecedenceInfo info, List<int> data, int start, | 486 CommentToken.fromUtf8Bytes(PrecedenceInfo info, List<int> data, int start, |
| 481 int end, bool asciiOnly, int charOffset) | 487 int end, bool asciiOnly, int charOffset) |
| 482 : super.fromUtf8Bytes(info, data, start, end, asciiOnly, charOffset); | 488 : super.fromUtf8Bytes(info, data, start, end, asciiOnly, charOffset); |
| 483 | 489 |
| 484 CommentToken._(PrecedenceInfo info, valueOrLazySubstring, int charOffset) | 490 CommentToken._(PrecedenceInfo info, valueOrLazySubstring, int charOffset) |
| 485 : super._(info, valueOrLazySubstring, charOffset); | 491 : super._(info, valueOrLazySubstring, charOffset); |
| 486 | 492 |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 identical(value, "<=") || | 643 identical(value, "<=") || |
| 638 identical(value, "<") || | 644 identical(value, "<") || |
| 639 identical(value, "&") || | 645 identical(value, "&") || |
| 640 identical(value, "^") || | 646 identical(value, "^") || |
| 641 identical(value, "|"); | 647 identical(value, "|"); |
| 642 } | 648 } |
| 643 | 649 |
| 644 bool isTernaryOperator(String value) => identical(value, "[]="); | 650 bool isTernaryOperator(String value) => identical(value, "[]="); |
| 645 | 651 |
| 646 bool isMinusOperator(String value) => identical(value, "-"); | 652 bool isMinusOperator(String value) => identical(value, "-"); |
| OLD | NEW |