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

Side by Side Diff: pkg/compiler/lib/src/parser/parser.dart

Issue 2541473002: Handle 'dynamic' as type argument in generic calls. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | tests/compiler/dart2js/generic_method_type_usage_test.dart » ('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 library dart2js.parser; 5 library dart2js.parser;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../tokens/keyword.dart' show Keyword; 8 import '../tokens/keyword.dart' show Keyword;
9 import '../tokens/precedence.dart' show PrecedenceInfo; 9 import '../tokens/precedence.dart' show PrecedenceInfo;
10 import '../tokens/precedence_constants.dart' 10 import '../tokens/precedence_constants.dart'
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 token = tryParseQualified(token); 570 token = tryParseQualified(token);
571 if (token == null) return null; 571 if (token == null) return null;
572 Token tokenAfterQualified = token; 572 Token tokenAfterQualified = token;
573 token = tryParseNestedTypeArguments(token); 573 token = tryParseNestedTypeArguments(token);
574 return token == null ? tokenAfterQualified : token; 574 return token == null ? tokenAfterQualified : token;
575 } 575 }
576 576
577 /// Returns token after match if [token] matches identifier ('.' identifier)?, 577 /// Returns token after match if [token] matches identifier ('.' identifier)?,
578 /// and otherwise returns null. Does not produce listener events. 578 /// and otherwise returns null. Does not produce listener events.
579 Token tryParseQualified(Token token) { 579 Token tryParseQualified(Token token) {
580 if (!identical(token.kind, IDENTIFIER_TOKEN)) return null; 580 if (!isValidTypeReference(token)) return null;
581 token = token.next; 581 token = token.next;
582 if (!identical(token.kind, PERIOD_TOKEN)) return token; 582 if (!identical(token.kind, PERIOD_TOKEN)) return token;
583 token = token.next; 583 token = token.next;
584 if (!identical(token.kind, IDENTIFIER_TOKEN)) return null; 584 if (!identical(token.kind, IDENTIFIER_TOKEN)) return null;
585 return token.next; 585 return token.next;
586 } 586 }
587 587
588 /// Returns token after match if [token] matches '<' type (',' type)* '>', 588 /// Returns token after match if [token] matches '<' type (',' type)* '>',
589 /// and otherwise returns null. Does not produce listener events. The final 589 /// and otherwise returns null. Does not produce listener events. The final
590 /// '>' may be the first character in a '>>' token, in which case a synthetic 590 /// '>' may be the first character in a '>>' token, in which case a synthetic
(...skipping 2400 matching lines...) Expand 10 before | Expand all | Expand 10 after
2991 } 2991 }
2992 listener.handleContinueStatement(hasTarget, continueKeyword, token); 2992 listener.handleContinueStatement(hasTarget, continueKeyword, token);
2993 return expectSemicolon(token); 2993 return expectSemicolon(token);
2994 } 2994 }
2995 2995
2996 Token parseEmptyStatement(Token token) { 2996 Token parseEmptyStatement(Token token) {
2997 listener.handleEmptyStatement(token); 2997 listener.handleEmptyStatement(token);
2998 return expectSemicolon(token); 2998 return expectSemicolon(token);
2999 } 2999 }
3000 } 3000 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/generic_method_type_usage_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698