summaryrefslogtreecommitdiff
path: root/valexpr.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-07-22 03:48:35 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-07-22 03:48:35 -0400
commitf0f2b34ea9db64bdabe65119d3fd265308e6d205 (patch)
treef574c98a695009a734a764991c095237c661334b /valexpr.cc
parent4bc29e1351faeba56cbfc1146fa1af33eba15f9d (diff)
downloadfork-ledger-f0f2b34ea9db64bdabe65119d3fd265308e6d205.tar.gz
fork-ledger-f0f2b34ea9db64bdabe65119d3fd265308e6d205.tar.bz2
fork-ledger-f0f2b34ea9db64bdabe65119d3fd265308e6d205.zip
More work toward getting my ledger data to parse.
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