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

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

Issue 12087094: Removed Dynamic keyword support from dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Copied inherited dart2js test status to dart2dart status file. Created 7 years, 9 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 /** 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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 listener.handleNoType(token); 397 listener.handleNoType(token);
398 return token; 398 return token;
399 } 399 }
400 400
401 bool isValidTypeReference(Token token) { 401 bool isValidTypeReference(Token token) {
402 final kind = token.kind; 402 final kind = token.kind;
403 if (identical(kind, IDENTIFIER_TOKEN)) return true; 403 if (identical(kind, IDENTIFIER_TOKEN)) return true;
404 if (identical(kind, KEYWORD_TOKEN)) { 404 if (identical(kind, KEYWORD_TOKEN)) {
405 Keyword keyword = token.value; 405 Keyword keyword = token.value;
406 String value = keyword.stringValue; 406 String value = keyword.stringValue;
407 // TODO(aprelev@gmail.com): Remove deprecated Dynamic keyword support.
408 return keyword.isPseudo 407 return keyword.isPseudo
409 || (identical(value, 'dynamic')) 408 || (identical(value, 'dynamic'))
410 || (identical(value, 'Dynamic'))
411 || (identical(value, 'void')); 409 || (identical(value, 'void'));
412 } 410 }
413 return false; 411 return false;
414 } 412 }
415 413
416 Token parseDefaultClauseOpt(Token token) { 414 Token parseDefaultClauseOpt(Token token) {
417 if (isDefaultKeyword(token)) { 415 if (isDefaultKeyword(token)) {
418 // TODO(ahe): Remove support for 'factory' in this position. 416 // TODO(ahe): Remove support for 'factory' in this position.
419 Token defaultKeyword = token; 417 Token defaultKeyword = token;
420 listener.beginDefaultClause(defaultKeyword); 418 listener.beginDefaultClause(defaultKeyword);
(...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after
2222 } 2220 }
2223 listener.handleContinueStatement(hasTarget, continueKeyword, token); 2221 listener.handleContinueStatement(hasTarget, continueKeyword, token);
2224 return expectSemicolon(token); 2222 return expectSemicolon(token);
2225 } 2223 }
2226 2224
2227 Token parseEmptyStatement(Token token) { 2225 Token parseEmptyStatement(Token token) {
2228 listener.handleEmptyStatement(token); 2226 listener.handleEmptyStatement(token);
2229 return expectSemicolon(token); 2227 return expectSemicolon(token);
2230 } 2228 }
2231 } 2229 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698