lvm.js

changeset 4
0eda73eda4ae
parent 3
6f338fbf0abc
child 5
c5c9c4f2d1d3
equal deleted inserted replaced
3:6f338fbf0abc 4:0eda73eda4ae
22 }, 22 },
23 index: function (key) 23 index: function (key)
24 { 24 {
25 if(this.type == "table") 25 if(this.type == "table")
26 { 26 {
27 return this.value[key.value]; 27 var val = this.value[key.value];
28 if(typeof(val) == "undefined")
29 return new LValue("nil", null);
30 return val;
28 } 31 }
29 }, 32 },
30 setIndex: function (key, value) 33 setIndex: function (key, value)
31 { 34 {
32 if(this.type == "table") 35 if(this.type == "table")

mercurial