public override Calculator_Expression Optimize() { _expr = _expr.Optimize(); return(_expr._token.Type == TKTYPE.LITERAL ? new Calculator_Expression(this.Evaluate(null)) : this); }
public override Calculator_Expression Optimize() { _lft = _lft.Optimize(); _rgt = _rgt.Optimize(); return(_lft._token.Type == TKTYPE.LITERAL && _rgt._token.Type == TKTYPE.LITERAL ? new Calculator_Expression(this.Evaluate(null)) : this); }