diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-04 20:40:07 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-04 20:40:48 -0500 |
commit | 78e6770c4c276db3647952f21a6bf3ea465edb88 (patch) | |
tree | 64190d80ea0c3933dffaee3cf0e43cde5ea0e6a6 /src/py_value.cc | |
parent | 4a14f3224b9063202ca39a67c9aff42ae4274942 (diff) | |
download | fork-ledger-78e6770c4c276db3647952f21a6bf3ea465edb88.tar.gz fork-ledger-78e6770c4c276db3647952f21a6bf3ea465edb88.tar.bz2 fork-ledger-78e6770c4c276db3647952f21a6bf3ea465edb88.zip |
Segregated symbols into 5 separate namespaces
The different namespaces are:
Function Value expression functions, which receive a "context"
Option Command-line options
Precommand Commands which are invoked before reading the journal
Command Commands which are invoked after reading the journal
Directive Directives that occur at column 0 in a data file
This greatly eases the ability for Python uses to add intercept hooks to
change how the basic Ledger module functions. An example of what should
be possible soon:
import ledger
def my_foo_handler(value):
print "--foo received:", value
ledger.add_handler(ledger.Option, "foo=", my_foo_handler)
Diffstat (limited to 'src/py_value.cc')
-rw-r--r-- | src/py_value.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/py_value.cc b/src/py_value.cc index 86311736..eec3b833 100644 --- a/src/py_value.cc +++ b/src/py_value.cc @@ -51,7 +51,7 @@ namespace { { if (value.is_scope()) { if (scope_t * scope = value.as_scope()) - return expr_t(scope->lookup(name), scope); + return expr_t(scope->lookup(symbol_t::FUNCTION, name), scope); } throw_(value_error, _("Cannot lookup attributes in %1") << value.label()); return expr_t(); |