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 d671a99e674995f55b18c2437ae332aedec1b878..d003a246519cda6e252fdfc8b8610a6aaa41ad40 100644 |
--- a/compiler/java/com/google/dart/compiler/parser/DartParser.java |
+++ b/compiler/java/com/google/dart/compiler/parser/DartParser.java |
@@ -888,9 +888,23 @@ public class DartParser extends CompletionHooksParserBase { |
case VOID: |
case IDENTIFIER: { |
- // Check to see if it's a method/ctor. |
+ // Check to see if it's a qualified ctor. |
+ { |
+ // Skip (PERIOD IDENTIFIER)* sequence. |
+ // Actually only one is valid, but it is OK for parser. |
+ int k = 1; |
+ while (peek(k) == Token.PERIOD && peek(k + 1) == Token.IDENTIFIER) { |
+ k += 2; |
+ } |
+ // If next token is LPAREN, then this is constructor. |
+ if (peek(k) == Token.LPAREN) { |
+ member = parseMethodOrAccessor(modifiers, null); |
+ break; |
+ } |
+ } |
+ |
+ // Check to see if it's a method. |
if (peek(1) == Token.LPAREN |
- || peek(1) == Token.PERIOD |
|| peekPseudoKeyword(0, OPERATOR_KEYWORD) |
|| peekPseudoKeyword(0, GETTER_KEYWORD) |
|| peekPseudoKeyword(0, SETTER_KEYWORD)) { |