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

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

Issue 10786028: Record 'implements' keyword for class declaration nodes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 | « lib/compiler/implementation/scanner/listener.dart ('k') | tests/language/language.status » ('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 /** 5 /**
6 * An event generating parser of Dart programs. This parser expects 6 * An event generating parser of Dart programs. This parser expects
7 * all tokens in a linked list (aka a token stream). 7 * all tokens in a linked list (aka a token stream).
8 * 8 *
9 * The class [Scanner] is used to generate a token stream. See the 9 * The class [Scanner] is used to generate a token stream. See the
10 * file scanner.dart. 10 * file scanner.dart.
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 if (optional('extends', token)) { 223 if (optional('extends', token)) {
224 extendsKeyword = token; 224 extendsKeyword = token;
225 token = parseType(token.next); 225 token = parseType(token.next);
226 } else { 226 } else {
227 extendsKeyword = null; 227 extendsKeyword = null;
228 listener.handleNoType(token); 228 listener.handleNoType(token);
229 } 229 }
230 Token implementsKeyword; 230 Token implementsKeyword;
231 int interfacesCount = 0; 231 int interfacesCount = 0;
232 if (optional('implements', token)) { 232 if (optional('implements', token)) {
233 implementsKeyword = token;
233 do { 234 do {
234 token = parseType(token.next); 235 token = parseType(token.next);
235 ++interfacesCount; 236 ++interfacesCount;
236 } while (optional(',', token)); 237 } while (optional(',', token));
237 } 238 }
238 token = parseClassBody(token); 239 token = parseClassBody(token);
239 listener.endClassDeclaration(interfacesCount, begin, extendsKeyword, 240 listener.endClassDeclaration(interfacesCount, begin, extendsKeyword,
240 implementsKeyword, token); 241 implementsKeyword, token);
241 return token.next; 242 return token.next;
242 } 243 }
(...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1714 } 1715 }
1715 listener.handleContinueStatement(hasTarget, continueKeyword, token); 1716 listener.handleContinueStatement(hasTarget, continueKeyword, token);
1716 return expectSemicolon(token); 1717 return expectSemicolon(token);
1717 } 1718 }
1718 1719
1719 Token parseEmptyStatement(Token token) { 1720 Token parseEmptyStatement(Token token) {
1720 listener.handleEmptyStatement(token); 1721 listener.handleEmptyStatement(token);
1721 return expectSemicolon(token); 1722 return expectSemicolon(token);
1722 } 1723 }
1723 } 1724 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/scanner/listener.dart ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698