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 }; |