Index: src/parser.cc |
diff --git a/src/parser.cc b/src/parser.cc |
index e935b7b4a728b192240e15aeb031b790fdf77e4b..1df7c21450253e67a1b4674da43593b5b5551a11 100644 |
--- a/src/parser.cc |
+++ b/src/parser.cc |
@@ -3587,10 +3587,8 @@ ObjectLiteral::Property* Parser::ParseObjectLiteralGetSet(bool is_getter, |
// { ... , get foo() { ... }, ... , set foo(v) { ... v ... } , ... } |
// We have already read the "get" or "set" keyword. |
Token::Value next = Next(); |
- if (next == Token::IDENTIFIER || |
- next == Token::STRING || |
- next == Token::NUMBER || |
- Token::IsKeyword(next)) { |
+ // TODO(820): Allow NUMBER and STRING as well (and handle array indices). |
+ if (next == Token::IDENTIFIER || Token::IsKeyword(next)) { |
Handle<String> name = |
factory()->LookupSymbol(scanner_.literal_string(), |
scanner_.literal_length()); |
@@ -3652,8 +3650,7 @@ Expression* Parser::ParseObjectLiteral(bool* ok) { |
factory()->LookupSymbol(scanner_.literal_string(), |
scanner_.literal_length()); |
uint32_t index; |
- if (!string.is_null() && |
- string->AsArrayIndex(&index)) { |
+ if (!string.is_null() && string->AsArrayIndex(&index)) { |
key = NewNumberLiteral(index); |
break; |
} |