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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/scanner/parser.dart

Issue 27510003: Scanner for UTF-8 byte arrays (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fixes compiler tests Created 7 years, 2 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
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 part of scanner; 5 part of scanner;
6 6
7 class FormalParameterType { 7 class FormalParameterType {
8 final String type; 8 final String type;
9 const FormalParameterType(this.type); 9 const FormalParameterType(this.type);
10 bool get isRequired => this == REQUIRED; 10 bool get isRequired => this == REQUIRED;
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 if (optional('<', token)) { 630 if (optional('<', token)) {
631 Token begin = token; 631 Token begin = token;
632 beginStuff(begin); 632 beginStuff(begin);
633 int count = 0; 633 int count = 0;
634 do { 634 do {
635 token = stuffParser(token.next); 635 token = stuffParser(token.next);
636 ++count; 636 ++count;
637 } while (optional(',', token)); 637 } while (optional(',', token));
638 Token next = token.next; 638 Token next = token.next;
639 if (identical(token.stringValue, '>>')) { 639 if (identical(token.stringValue, '>>')) {
640 token = new Token(GT_INFO, token.charOffset); 640 token = new SymbolToken(GT_INFO, token.charOffset);
641 token.next = new Token(GT_INFO, token.charOffset + 1); 641 token.next = new SymbolToken(GT_INFO, token.charOffset + 1);
642 token.next.next = next; 642 token.next.next = next;
643 } else if (identical(token.stringValue, '>>>')) { 643 } else if (identical(token.stringValue, '>>>')) {
644 token = new Token(GT_INFO, token.charOffset); 644 token = new SymbolToken(GT_INFO, token.charOffset);
645 token.next = new Token(GT_GT_INFO, token.charOffset + 1); 645 token.next = new SymbolToken(GT_GT_INFO, token.charOffset + 1);
646 token.next.next = next; 646 token.next.next = next;
647 } 647 }
648 endStuff(count, begin, token); 648 endStuff(count, begin, token);
649 return expect('>', token); 649 return expect('>', token);
650 } 650 }
651 handleNoStuff(token); 651 handleNoStuff(token);
652 return token; 652 return token;
653 } 653 }
654 654
655 Token parseTopLevelMember(Token token) { 655 Token parseTopLevelMember(Token token) {
(...skipping 1777 matching lines...) Expand 10 before | Expand all | Expand 10 after
2433 } 2433 }
2434 listener.handleContinueStatement(hasTarget, continueKeyword, token); 2434 listener.handleContinueStatement(hasTarget, continueKeyword, token);
2435 return expectSemicolon(token); 2435 return expectSemicolon(token);
2436 } 2436 }
2437 2437
2438 Token parseEmptyStatement(Token token) { 2438 Token parseEmptyStatement(Token token) {
2439 listener.handleEmptyStatement(token); 2439 listener.handleEmptyStatement(token);
2440 return expectSemicolon(token); 2440 return expectSemicolon(token);
2441 } 2441 }
2442 } 2442 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698