public override Expression Constantify(ResolveContext resolver) { Constant cleft = left.Constantify(resolver) as Constant; Constant cright = right.Constantify(resolver) as Constant; if (cleft == null || cright == null) { return(null); } return(DoResolve(resolver)); }
public override Expression Constantify(ResolveContext resolver) { Constant c = Expr.Constantify(resolver) as Constant; if (c == null) { return(null); } switch (Oper) { case UnaryOperatorType.LogicalNot: case UnaryOperatorType.OnesComplement: case UnaryOperatorType.UnaryNegation: case UnaryOperatorType.UnaryPlus: return(DoResolve(resolver)); default: return(null); } }