| 154 | } |
| 155 | |
| 156 | inline bool |
| 157 | Expression::_evalSimpleExpr(const char *expr, int expr_len) |
| 158 | { |
| 159 | const string &lhs = expand(expr, expr_len); |
| 160 | Dbg(dbg_ctl, "[%s] simple expression [%.*s] evaluated to [%.*s]", __FUNCTION__, expr_len, expr, int(lhs.size()), lhs.data()); |
| 161 | double val; |
| 162 | return _convert(lhs, val) ? val : !lhs.empty(); |
| 163 | } |
| 164 | |
| 165 | bool |
| 166 | Expression::evaluate(const char *expr, int expr_len /* = -1 */) |