lvm.js

changeset 3
6f338fbf0abc
parent 2
253863ece36f
child 4
0eda73eda4ae
--- 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)
 	{

mercurial