summaryrefslogtreecommitdiff
path: root/src/session.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-24 22:10:41 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-24 22:10:41 -0400
commit5a194cbdf4533b337776959fb2a2bb5ebccd35db (patch)
tree03f9d2b4e397e940687a902ae9f21190e5782d63 /src/session.cc
parent20077db3c80aa80b49c0306cfc233247b8510cf6 (diff)
downloadfork-ledger-5a194cbdf4533b337776959fb2a2bb5ebccd35db.tar.gz
fork-ledger-5a194cbdf4533b337776959fb2a2bb5ebccd35db.tar.bz2
fork-ledger-5a194cbdf4533b337776959fb2a2bb5ebccd35db.zip
Allow value expressions access to session options
Diffstat (limited to 'src/session.cc')
-rw-r--r--src/session.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/session.cc b/src/session.cc
index 9d1a23f4..3c6b6ddb 100644
--- a/src/session.cc
+++ b/src/session.cc
@@ -258,6 +258,10 @@ expr_t::ptr_op_t session_t::lookup(const string& name)
break;
}
+ // Check if they are trying to access an option's setting or value.
+ if (option_t<session_t> * handler = lookup_option(p))
+ return MAKE_OPT_FUNCTOR(session_t, handler);
+
return symbol_scope_t::lookup(name);
}