summaryrefslogtreecommitdiff
path: root/src/op.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-02 15:17:02 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-02 15:17:02 -0400
commitbd9ffed9db00e31e4ad526f4558d0d2929c8ac39 (patch)
treeda0933acef4727f78b922ac7f03524b0a72586a5 /src/op.cc
parent46b35a015bc72a7ecf03a296f6dc20917c6ae7f0 (diff)
downloadfork-ledger-bd9ffed9db00e31e4ad526f4558d0d2929c8ac39.tar.gz
fork-ledger-bd9ffed9db00e31e4ad526f4558d0d2929c8ac39.tar.bz2
fork-ledger-bd9ffed9db00e31e4ad526f4558d0d2929c8ac39.zip
Calculate the right-hand side O_MATCH, now that masks are values.
Diffstat (limited to 'src/op.cc')
-rw-r--r--src/op.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/op.cc b/src/op.cc
index 588adc4b..237426f7 100644
--- a/src/op.cc
+++ b/src/op.cc
@@ -150,9 +150,11 @@ value_t expr_t::op_t::opcalc(scope_t& scope)
}
case O_MATCH:
+#if 0
if (! right()->is_value() || ! right()->as_value().is_mask())
throw_(calc_error, "Right-hand argument to match operator must be a regex");
- return right()->as_value().as_mask().match(left()->opcalc(scope).to_string());
+#endif
+ return right()->opcalc(scope).as_mask().match(left()->opcalc(scope).to_string());
case INDEX: {
const call_scope_t& args(downcast<const call_scope_t>(scope));