summaryrefslogtreecommitdiff
path: root/src/global.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-07 05:47:21 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-07 05:47:21 -0400
commitea9330adaeedbdb5a03b4f37910b30f0ddb23e29 (patch)
tree6919e137cc645b2d3be307e1d9e4129fdf971e2e /src/global.h
parent66d007db9d4f7b793d53e08acc852b2bda335e32 (diff)
downloadfork-ledger-ea9330adaeedbdb5a03b4f37910b30f0ddb23e29.tar.gz
fork-ledger-ea9330adaeedbdb5a03b4f37910b30f0ddb23e29.tar.bz2
fork-ledger-ea9330adaeedbdb5a03b4f37910b30f0ddb23e29.zip
Allow value expressions to gain access to option settings.
For example, "ledger eval options.limit" prints 0 (for false), but: "ledger -l hello eval options.limit" print "hello"s, since the value of options.limit, once set to a value, is that string. For flag options, such as -Y, eval prints 0 if unset, and 1 if set. This feature allows value expressions to be conditionalized based on the presence of user options.
Diffstat (limited to 'src/global.h')
-rw-r--r--src/global.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/global.h b/src/global.h
index f7f10b30..85745ba2 100644
--- a/src/global.h
+++ b/src/global.h
@@ -109,6 +109,8 @@ See LICENSE file included with the distribution for details and disclaimer.";
out << std::endl;
}
+ option_t<global_scope_t> * lookup_option(const char * p);
+
virtual expr_t::ptr_op_t lookup(const string& name);
OPTION(global_scope_t, debug_);