コード例 #1
0
 public override Calculator_Expression Optimize()
 {
     _expr = _expr.Optimize();
     return(_expr._token.Type == TKTYPE.LITERAL
         ? new Calculator_Expression(this.Evaluate(null))
         : this);
 }
コード例 #2
0
 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);
 }