Index: vm/parser.cc |
=================================================================== |
--- vm/parser.cc (revision 1714) |
+++ vm/parser.cc (working copy) |
@@ -3162,6 +3162,10 @@ |
ErrorMsg("prefix expected"); |
} |
prefix = CurrentLiteral()->raw(); |
+ // TODO(asiva): Need to also check that prefix is not a reserved keyword. |
+ if (!Scanner::IsIdent(prefix)) { |
+ ErrorMsg("prefix should be an identifier"); |
+ } |
ConsumeToken(); |
} |
ExpectToken(Token::kRPAREN); |