refactor inheritance in mixin.js

This commit is contained in:
cloudhead 2010-06-19 02:05:09 -04:00
parent 94dfd6fac7
commit e73176e532

View File

@ -54,9 +54,11 @@ tree.mixin.Definition = function (name, params, rules) {
};
tree.mixin.Definition.prototype = {
toCSS: function () { return "" },
variable: function (name) { return tree.Ruleset.prototype.variable.call(this, name) },
find: function () { return tree.Ruleset.prototype.find.apply(this, arguments) },
rulesets: function () { return tree.Ruleset.prototype.rulesets.apply(this) },
parent: tree.Ruleset.prototype,
variable: function (name) { return this.parent.variable.call(this, name) },
find: function () { return this.parent.find.apply(this, arguments) },
rulesets: function () { return this.parent.rulesets.apply(this) },
eval: function (args, env) {
var frame = new(tree.Ruleset)(null, []), context;