Commit 88ee4324 authored by arv@chromium.org's avatar arv@chromium.org

Refactor ParseObjectLiteral

This extracts the parsing of the ObjectLiteralProperty into its own
function. This is in preparation for adding support for parsing classes.

BUG=None
LOG=Y
R=dslomov@chromium.org, marja@chromium.org

Review URL: https://codereview.chromium.org/458613004

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23249 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 72ffc42d
......@@ -439,7 +439,8 @@ class ParserTraits {
}
static void CheckFunctionLiteralInsideTopLevelObjectLiteral(
Scope* scope, Expression* value, bool* has_function) {
Scope* scope, ObjectLiteralProperty* property, bool* has_function) {
Expression* value = property->value();
if (scope->DeclarationScope()->is_global_scope() &&
value->AsFunctionLiteral() != NULL) {
*has_function = true;
......@@ -529,6 +530,7 @@ class ParserTraits {
static Literal* EmptyLiteral() {
return NULL;
}
static ObjectLiteralProperty* EmptyObjectLiteralProperty() { return NULL; }
// Used in error return values.
static ZoneList<Expression*>* NullExpressionList() {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment