6
Add::Add(Expr *e1, Expr *e2)
8
_result.TypePtr(e1->eval_type());
19
void Add::print(ostream &o) const
21
PrintBinaryExpression(o,*_left,"+",*_right);
24
const TypedValue &Add::eval(ValueStore &t)
26
const TypedValue &left = _left->eval(t);
27
const TypedValue &right = _right->eval(t);
29
if(!left.HasValue() || !right.HasValue())
39
_result = (int)left + (int)right;
42
_result = (float)left + (float)right;
46
Str s=(const char *)left;
47
s += (const char *)right;
52
_result = (time_t)left + (time_t)right;
60
Boolean Add::modified_attributes(ConstCharPtrArray *arr, Boolean /*in_lvalue*/)
62
return _left->modified_attributes(arr,FALSE) + _right->modified_attributes(arr,FALSE);