diff -r 253863ece36f -r 6f338fbf0abc lvm.js --- a/lvm.js Mon Apr 05 17:03:06 2010 +0100 +++ b/lvm.js Mon Apr 05 17:14:09 2010 +0100 @@ -15,7 +15,10 @@ LValue.prototype = { call: function (args) { - return this.value; + if(this.type == "function") + return this.value; + else + throw "Attempt to call a " + this.type + " value"; }, index: function (key) {