mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1168992 - Part 1: Fix up reflection of classes. (r=Waldo)
This commit is contained in:
parent
f7d4140df8
commit
919c23ca38
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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",
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user