| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 abstract class Scanner { | 5 abstract class Scanner { |
| 6 Token tokenize(); | 6 Token tokenize(); |
| 7 } | 7 } |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Common base class for a Dart scanner. | 10 * Common base class for a Dart scanner. |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 // > >= >> >>= >>> >>>= | 424 // > >= >> >>= >>> >>>= |
| 425 next = advance(); | 425 next = advance(); |
| 426 if ($EQ === next) { | 426 if ($EQ === next) { |
| 427 appendPrecedenceToken(GT_EQ_INFO); | 427 appendPrecedenceToken(GT_EQ_INFO); |
| 428 return advance(); | 428 return advance(); |
| 429 } else if ($GT === next) { | 429 } else if ($GT === next) { |
| 430 next = advance(); | 430 next = advance(); |
| 431 if ($EQ === next) { | 431 if ($EQ === next) { |
| 432 appendPrecedenceToken(GT_GT_EQ_INFO); | 432 appendPrecedenceToken(GT_GT_EQ_INFO); |
| 433 return advance(); | 433 return advance(); |
| 434 } else if ($GT === next) { | |
| 435 next = advance(); | |
| 436 if (next === $EQ) { | |
| 437 appendPrecedenceToken(GT_GT_GT_EQ_INFO); | |
| 438 return advance(); | |
| 439 } else { | |
| 440 appendGtGtGt(GT_GT_GT_INFO, ">>>"); | |
| 441 return next; | |
| 442 } | |
| 443 } else { | 434 } else { |
| 444 appendGtGt(GT_GT_INFO, ">>"); | 435 appendGtGt(GT_GT_INFO, ">>"); |
| 445 return next; | 436 return next; |
| 446 } | 437 } |
| 447 } else { | 438 } else { |
| 448 appendGt(GT_INFO, ">"); | 439 appendGt(GT_INFO, ">"); |
| 449 return next; | 440 return next; |
| 450 } | 441 } |
| 451 } | 442 } |
| 452 | 443 |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 next = advance(); | 863 next = advance(); |
| 873 } | 864 } |
| 874 return error(const SourceString("unterminated string literal")); | 865 return error(const SourceString("unterminated string literal")); |
| 875 } | 866 } |
| 876 | 867 |
| 877 int error(SourceString message) { | 868 int error(SourceString message) { |
| 878 appendByteStringToken(BAD_INPUT_INFO, message); | 869 appendByteStringToken(BAD_INPUT_INFO, message); |
| 879 return advance(); // Ensure progress. | 870 return advance(); // Ensure progress. |
| 880 } | 871 } |
| 881 } | 872 } |
| OLD | NEW |