if a function isnt found, just output it literally

This commit is contained in:
cloudhead 2010-03-04 16:13:19 -05:00
parent 2f55206eb7
commit 7e3d8bda32

View File

@ -7,6 +7,11 @@ tree.Call = function Call(name, args) {
tree.Call.prototype = {
toCSS: function (context, env) {
var args = this.args.map(function (a) { return a.eval() });
return tree.functions[this.name].apply(tree.functions, args).toCSS();
if (this.name in tree.functions) {
return tree.functions[this.name].apply(tree.functions, args).toCSS();
} else {
return this.name +
"(" + args.map(function (a) { return a.toCSS() }).join(', ') + ")";
}
}
};