Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Side by Side Diff: dart/lib/compiler/implementation/scanner/scanner.dart

Issue 10945027: Remove >>> and >>>= from scanner. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | dart/lib/compiler/implementation/scanner/token.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | dart/lib/compiler/implementation/scanner/token.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698