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 7e19eaba68b3c1ad9ce2ff119f0bdb1d2b9c4aa5..af8e08991aea5d2af543e64ca05cea47e4beb894 100644 |
--- a/compiler/java/com/google/dart/compiler/parser/DartParser.java |
+++ b/compiler/java/com/google/dart/compiler/parser/DartParser.java |
@@ -2625,10 +2625,11 @@ public class DartParser extends CompletionHooksParserBase { |
case IDENTIFIER: |
// we have already eliminated function declarations earlier, so just need to check for |
// variable declarations here. |
- if (peek(1) == Token.LT || peek(1) == Token.IDENTIFIER) { |
+ if (peek(1) == Token.LT || peek(1) == Token.IDENTIFIER |
+ || (peek(1) == Token.PERIOD && peek(2) == Token.IDENTIFIER)) { |
beginTypeFunctionOrVariable(); |
DartTypeNode type = tryTypeAnnotation(); |
- if (type != null) { |
+ if (type != null && peek(0) == Token.IDENTIFIER) { |
List<DartVariable> vars = parseInitializedVariableList(); |
expect(Token.SEMICOLON); |
return done(new DartVariableStatement(vars, type)); |