summaryrefslogtreecommitdiff
path: root/valexpr.cc
diff options
context:
space:
mode:
Diffstat (limited to 'valexpr.cc')
-rw-r--r--valexpr.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/valexpr.cc b/valexpr.cc
index 8b92e0af..16f43a15 100644
--- a/valexpr.cc
+++ b/valexpr.cc
@@ -1083,12 +1083,16 @@ value_t op_t::calc(scope_t& scope)
} // namespace expr
+namespace {
+ expr::parser_t value_expr_parser;
+}
+
value_expr::value_expr(const string& _expr_str) : expr_str(_expr_str)
{
TRACE_CTOR(value_expr, "const string&");
if (! _expr_str.empty())
- ptr = expr::parser_t(expr_str).expr.ptr;
+ ptr = value_expr_parser.parse(expr_str).ptr;
}
} // namespace ledger