Chromium Code Reviews| Index: compiler/java/com/google/dart/compiler/parser/DartParser.java |
| diff --git a/compiler/java/com/google/dart/compiler/parser/DartParser.java b/compiler/java/com/google/dart/compiler/parser/DartParser.java |
| index 52fc45067e17a5d50203226d17950380ab68bff8..b93b69428df19ab01a8bd07cfc432d6136b1a7a7 100644 |
| --- a/compiler/java/com/google/dart/compiler/parser/DartParser.java |
| +++ b/compiler/java/com/google/dart/compiler/parser/DartParser.java |
| @@ -961,24 +961,20 @@ public class DartParser extends CompletionHooksParserBase { |
| consume(Token.IDENTIFIER); |
| if (peek(0).equals(Token.PERIOD) && peek(1).equals(Token.IDENTIFIER)) { |
| - // Case 1 a constructor of the form class.id |
| - if (peek(0).equals(Token.LPAREN)) { |
| - return true; |
| - } |
| - |
| // Case 2, a constructor of the form library.class.<typearguments?>.id |
|
codefu
2011/12/02 13:51:21
There's no more case 1 prior to this comment.
|
| consume(Token.PERIOD); |
| consume(Token.IDENTIFIER); |
| - parseTypeArgumentsOpt(); |
| - if (peek(0).equals(Token.PERIOD) && peek(1).equals(Token.IDENTIFIER) && peek(2).equals(Token.LPAREN)) { |
| + parseTypeArgumentsOpt(); |
|
codefu
2011/12/02 13:51:21
ws
|
| + if (peek(0).equals(Token.PERIOD) && peek(1).equals(Token.IDENTIFIER) |
| + && peek(2).equals(Token.LPAREN)) { |
| return true; |
| } |
| + } else { |
| + // Case 1 class.id<typearguments> |
| + // Case 3, id<typearguments?> |
| + parseTypeArgumentsOpt(); |
| } |
| - // Case 1 class.id<typearguments> |
| - // Case 3, id<typearguments?> |
| - parseTypeArgumentsOpt(); |
| - |
| if (peek(0).equals(Token.PERIOD) && peek(1).equals(Token.IDENTIFIER)) { |
| // Case 1, a constructor of the form class<typearguments>.id |
| consume(Token.PERIOD); |
| @@ -1089,9 +1085,8 @@ public class DartParser extends CompletionHooksParserBase { |
| } else { |
| // Normal method or property. |
| name = parseIdentifier(); |
| - |
| // TODO(zundel): something constructive with the type arguments |
| - parseTypeArgumentsOpt(); |
| + parseTypeArgumentsOpt(); |
| } |
| // Check for named constructor. |