Index: src/parsing/parser.cc |
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc |
index a2c6f22e4e0696f7ac1087ca43b12f44acf43580..871bf7bb1ad25880cdc78aff0947d56fa8dbbba2 100644 |
--- a/src/parsing/parser.cc |
+++ b/src/parsing/parser.cc |
@@ -1289,6 +1289,18 @@ Statement* Parser::ParseStatementListItem(bool* ok) { |
return ParseVariableStatement(kStatementListItem, NULL, ok); |
} |
break; |
+ case Token::IDENTIFIER: { |
+ if (!scope_->typed()) break; |
+ int pos = peek_position(); |
+ if (PeekContextualKeyword(CStrVector("type")) && |
+ PeekAhead() == Token::IDENTIFIER) { |
+ Consume(Token::IDENTIFIER); |
+ return ParseTypeAliasDeclaration(pos, ok); |
+ } |
+ break; |
+ } |
+ // TODO(nikolaos): interface |
+ // TODO(nikolaos): ambient |
default: |
break; |
} |