Index: src/preparser.h |
diff --git a/src/preparser.h b/src/preparser.h |
index 64f456b2d7d808cb10a56986ad667f7c0f53892c..4a35cd59f52dfa71426abc71f58937ce3d783f86 100644 |
--- a/src/preparser.h |
+++ b/src/preparser.h |
@@ -1688,6 +1688,7 @@ void ParserBase<Traits>::ReportUnexpectedToken(Token::Value token) { |
switch (token) { |
case Token::EOS: |
return ReportMessageAt(source_location, "unexpected_eos"); |
+ case Token::SMI: |
case Token::NUMBER: |
return ReportMessageAt(source_location, "unexpected_token_number"); |
case Token::STRING: |
@@ -1874,6 +1875,7 @@ ParserBase<Traits>::ParsePrimaryExpression(bool* ok) { |
case Token::NULL_LITERAL: |
case Token::TRUE_LITERAL: |
case Token::FALSE_LITERAL: |
+ case Token::SMI: |
case Token::NUMBER: |
Next(); |
result = |
@@ -2055,6 +2057,11 @@ typename ParserBase<Traits>::ExpressionT ParserBase<Traits>::ParsePropertyName( |
*name = this->GetSymbol(scanner()); |
break; |
+ case Token::SMI: |
+ Consume(Token::SMI); |
+ *name = this->GetNumberAsSymbol(scanner()); |
+ break; |
+ |
case Token::NUMBER: |
Consume(Token::NUMBER); |
*name = this->GetNumberAsSymbol(scanner()); |
@@ -3069,7 +3076,7 @@ void ParserBase<Traits>::ObjectLiteralChecker::CheckProperty( |
DCHECK(!is_static); |
DCHECK(!is_generator || type == kMethodProperty); |
- if (property == Token::NUMBER) return; |
+ if (property == Token::SMI || property == Token::NUMBER) return; |
if (type == kValueProperty && IsProto()) { |
if (has_seen_proto_) { |
@@ -3089,7 +3096,7 @@ void ParserBase<Traits>::ClassLiteralChecker::CheckProperty( |
bool* ok) { |
DCHECK(type == kMethodProperty || type == kAccessorProperty); |
- if (property == Token::NUMBER) return; |
+ if (property == Token::SMI || property == Token::NUMBER) return; |
if (is_static) { |
if (IsPrototype()) { |