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 f7d4140df8
commit 919c23ca38
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 callback(cb, name, heritage, block, pos, dst);
return newNode(type, pos, return newNode(type, pos,
"name", name, "id", name,
"heritage", heritage, "superClass", heritage,
"body", block, "body", block,
dst); dst);
} }

View File

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

View File

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