Bug 1168992 - Part 1: Fix up reflection of classes. (r=Waldo)

This commit is contained in:
Eric Faust 2015-09-02 15:09:02 -07:00
parent 2df85d08d2
commit 262ef8bc15
3 changed files with 7 additions and 7 deletions

View File

@ -1819,8 +1819,8 @@ NodeBuilder::classDefinition(bool expr, HandleValue name, HandleValue heritage,
return callback(cb, name, heritage, block, pos, dst);
return newNode(type, pos,
"name", name,
"heritage", heritage,
"id", name,
"superClass", heritage,
"body", block,
dst);
}

View File

@ -38,7 +38,7 @@ functionDeclaration = (id, params, body) => Pattern({
});
classDeclaration = (name) => Pattern({
type: "ClassStatement",
name: name
id: name
});
variableDeclaration = (decls) => Pattern({
type: "VariableDeclaration",

View File

@ -132,14 +132,14 @@ function superElem(id) {
function classStmt(id, heritage, body) {
return Pattern({ type: "ClassStatement",
name: id,
heritage: heritage,
id: id,
superClass: heritage,
body: body});
}
function classExpr(id, heritage, body) {
return Pattern({ type: "ClassExpression",
name: id,
heritage: heritage,
id: id,
superClass: heritage,
body: body});
}
function classMethod(id, body, kind, static) {