Added --value-expr option
This commit is contained in:
parent
2df8edc71c
commit
022059f2a8
4 changed files with 6 additions and 0 deletions
|
|
@ -424,6 +424,7 @@ appeared in the original journal file.
|
|||
.It Fl \-unrealized-gains
|
||||
.It Fl \-unrealized-losses
|
||||
.It Fl \-unround
|
||||
.It Fl \-value-expr Ar EXPR
|
||||
.It Fl \-verbose
|
||||
.It Fl \-verify
|
||||
.It Fl \-version
|
||||
|
|
|
|||
|
|
@ -112,6 +112,8 @@ std::size_t session_t::read_data(const string& master_account)
|
|||
journal->checking_style = journal_t::CHECK_ERROR;
|
||||
else if (HANDLED(strict))
|
||||
journal->checking_style = journal_t::CHECK_WARNING;
|
||||
else if (HANDLED(value_expr))
|
||||
journal->value_expr = HANDLER(value_expr).str();
|
||||
|
||||
#if defined(HAVE_BOOST_SERIALIZATION)
|
||||
optional<archive_t> cache;
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ public:
|
|||
|
||||
unique_ptr<journal_t> journal;
|
||||
parse_context_stack_t parsing_context;
|
||||
optional<expr_t> value_expr;
|
||||
|
||||
explicit session_t();
|
||||
virtual ~session_t() {
|
||||
|
|
@ -107,6 +108,7 @@ public:
|
|||
HANDLER(price_db_).report(out);
|
||||
HANDLER(price_exp_).report(out);
|
||||
HANDLER(strict).report(out);
|
||||
HANDLER(value_expr).report(out);
|
||||
}
|
||||
|
||||
option_t<session_t> * lookup_option(const char * p);
|
||||
|
|
@ -154,6 +156,7 @@ public:
|
|||
OPTION(session_t, permissive);
|
||||
OPTION(session_t, price_db_);
|
||||
OPTION(session_t, strict);
|
||||
OPTION(session_t, value_expr);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
0
test/baseline/opt-value-expr.test
Normal file
0
test/baseline/opt-value-expr.test
Normal file
Loading…
Add table
Reference in a new issue