lvm.js

changeset 76
d7d7a6bb90cd
parent 75
aaecd573ee30
child 77
ab8ff064d808
equal deleted inserted replaced
75:aaecd573ee30 76:d7d7a6bb90cd
112 } 112 }
113 else if((this.type == "number" || this.type == "string") 113 else if((this.type == "number" || this.type == "string")
114 && (op2.type == "number" || op2.type == "string")) 114 && (op2.type == "number" || op2.type == "string"))
115 { 115 {
116 // Plain addition 116 // Plain addition
117 return new LValue("number", parseFloat(this.value, 10) + parseFloat(op2.value)); 117 return this.vm.LValue(parseFloat(this.value, 10) + parseFloat(op2.value, 10));
118 } 118 }
119 else 119 else
120 throw "Attempt to perform arithmetic on a "+this.type+" and "+op2.type; 120 throw "Attempt to perform arithmetic on a "+this.type+" and "+op2.type;
121 } 121 }
122 }; 122 };

mercurial