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

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

Issue 99303004: Remove unused API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 } 424 }
425 425
426 Token parseQualifiedRest(Token token) { 426 Token parseQualifiedRest(Token token) {
427 assert(optional('.', token)); 427 assert(optional('.', token));
428 Token period = token; 428 Token period = token;
429 token = parseIdentifier(token.next); 429 token = parseIdentifier(token.next);
430 listener.handleQualified(period); 430 listener.handleQualified(period);
431 return token; 431 return token;
432 } 432 }
433 433
434 bool isDefaultKeyword(Token token) {
435 String value = token.stringValue;
436 if (identical(value, 'default')) return true;
437 if (identical(value, 'factory')) {
438 listener.recoverableError("expected 'default'", token: token);
439 return true;
440 }
441 return false;
442 }
443
444 Token skipBlock(Token token) { 434 Token skipBlock(Token token) {
445 if (!optional('{', token)) { 435 if (!optional('{', token)) {
446 return listener.expectedBlockToSkip(token); 436 return listener.expectedBlockToSkip(token);
447 } 437 }
448 BeginGroupToken beginGroupToken = token; 438 BeginGroupToken beginGroupToken = token;
449 Token endGroup = beginGroupToken.endGroup; 439 Token endGroup = beginGroupToken.endGroup;
450 if (endGroup == null) { 440 if (endGroup == null) {
451 return listener.unmatched(beginGroupToken); 441 return listener.unmatched(beginGroupToken);
452 } else if (!identical(endGroup.kind, $CLOSE_CURLY_BRACKET)) { 442 } else if (!identical(endGroup.kind, $CLOSE_CURLY_BRACKET)) {
453 return listener.unmatched(beginGroupToken); 443 return listener.unmatched(beginGroupToken);
(...skipping 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after
2436 } 2426 }
2437 listener.handleContinueStatement(hasTarget, continueKeyword, token); 2427 listener.handleContinueStatement(hasTarget, continueKeyword, token);
2438 return expectSemicolon(token); 2428 return expectSemicolon(token);
2439 } 2429 }
2440 2430
2441 Token parseEmptyStatement(Token token) { 2431 Token parseEmptyStatement(Token token) {
2442 listener.handleEmptyStatement(token); 2432 listener.handleEmptyStatement(token);
2443 return expectSemicolon(token); 2433 return expectSemicolon(token);
2444 } 2434 }
2445 } 2435 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698