From ea9330adaeedbdb5a03b4f37910b30f0ddb23e29 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 7 Feb 2009 05:47:21 -0400 Subject: 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. --- src/global.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/global.h') 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 * lookup_option(const char * p); + virtual expr_t::ptr_op_t lookup(const string& name); OPTION(global_scope_t, debug_); -- cgit v1.2.3