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

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

Issue 12036101: Add more tests and fix the parser to deal with generic superclasses for mixin applications. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | tests/language/language.status » ('j') | tests/language/language.status » ('J')
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 part of scanner; 5 part of scanner;
6 6
7 /** 7 /**
8 * An event generating parser of Dart programs. This parser expects 8 * An event generating parser of Dart programs. This parser expects
9 * all tokens in a linked list (aka a token stream). 9 * all tokens in a linked list (aka a token stream).
10 * 10 *
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 listener.handleModifier(token); 483 listener.handleModifier(token);
484 modifierCount++; 484 modifierCount++;
485 token = token.next; 485 token = token.next;
486 } 486 }
487 listener.handleModifiers(modifierCount); 487 listener.handleModifiers(modifierCount);
488 token = parseIdentifier(token.next); 488 token = parseIdentifier(token.next);
489 token = parseTypeVariablesOpt(token); 489 token = parseTypeVariablesOpt(token);
490 Token extendsKeyword; 490 Token extendsKeyword;
491 if (optional('extends', token)) { 491 if (optional('extends', token)) {
492 extendsKeyword = token; 492 extendsKeyword = token;
493 if (optional('with', token.next.next)) { 493 if (optional('with', peekAfterType(token.next))) {
494 token = parseMixinApplication(token.next); 494 token = parseMixinApplication(token.next);
karlklose 2013/01/25 10:12:47 Remove whitespace.
495 } else { 495 } else {
496 token = parseType(token.next); 496 token = parseType(token.next);
497 } 497 }
498 } else { 498 } else {
499 extendsKeyword = null; 499 extendsKeyword = null;
500 listener.handleNoType(token); 500 listener.handleNoType(token);
501 } 501 }
502 Token implementsKeyword; 502 Token implementsKeyword;
503 int interfacesCount = 0; 503 int interfacesCount = 0;
504 if (optional('implements', token)) { 504 if (optional('implements', token)) {
(...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after
2197 } 2197 }
2198 listener.handleContinueStatement(hasTarget, continueKeyword, token); 2198 listener.handleContinueStatement(hasTarget, continueKeyword, token);
2199 return expectSemicolon(token); 2199 return expectSemicolon(token);
2200 } 2200 }
2201 2201
2202 Token parseEmptyStatement(Token token) { 2202 Token parseEmptyStatement(Token token) {
2203 listener.handleEmptyStatement(token); 2203 listener.handleEmptyStatement(token);
2204 return expectSemicolon(token); 2204 return expectSemicolon(token);
2205 } 2205 }
2206 } 2206 }
OLDNEW
« no previous file with comments | « no previous file | tests/language/language.status » ('j') | tests/language/language.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698