Move the value expression code into libamounts, since it really belongs with
value_t, rather than the rest of Ledger proper.
This commit is contained in:
parent
4518ea9540
commit
d073a7e8a5
2 changed files with 12 additions and 12 deletions
20
Makefile.am
20
Makefile.am
|
|
@ -14,12 +14,18 @@ lib_LTLIBRARIES = libamounts.la libledger.la
|
|||
|
||||
libamounts_la_CPPFLAGS =
|
||||
libamounts_la_SOURCES = \
|
||||
utils.cc \
|
||||
times.cc \
|
||||
mask.cc \
|
||||
amount.cc \
|
||||
commodity.cc \
|
||||
balance.cc \
|
||||
value.cc \
|
||||
times.cc \
|
||||
utils.cc
|
||||
token.cc \
|
||||
parser.cc \
|
||||
op.cc \
|
||||
expr.cc \
|
||||
scope.cc
|
||||
if HAVE_EXPAT
|
||||
libamounts_la_CPPFLAGS += -DHAVE_EXPAT=1
|
||||
endif
|
||||
|
|
@ -38,12 +44,6 @@ endif
|
|||
|
||||
libledger_la_CPPFLAGS = $(libamounts_la_CPPFLAGS)
|
||||
libledger_la_SOURCES = \
|
||||
mask.cc \
|
||||
token.cc \
|
||||
parser.cc \
|
||||
op.cc \
|
||||
expr.cc \
|
||||
scope.cc \
|
||||
format.cc \
|
||||
\
|
||||
journal.cc \
|
||||
|
|
@ -81,8 +81,9 @@ pkginclude_HEADERS = \
|
|||
balance.h \
|
||||
balpair.h \
|
||||
value.h \
|
||||
times.h \
|
||||
utils.h \
|
||||
times.h \
|
||||
mask.h \
|
||||
error.h \
|
||||
\
|
||||
expr.h \
|
||||
|
|
@ -92,7 +93,6 @@ pkginclude_HEADERS = \
|
|||
scope.h \
|
||||
predicate.h \
|
||||
format.h \
|
||||
mask.h \
|
||||
\
|
||||
journal.h \
|
||||
report.h \
|
||||
|
|
|
|||
4
op.cc
4
op.cc
|
|
@ -702,12 +702,12 @@ value_t expr_t::op_t::calc(scope_t& scope)
|
|||
ptr_op_t def = func->compile(scope);
|
||||
if (def == func)
|
||||
throw_(calc_error,
|
||||
"Attempt to call unknown function '" << name << "'");
|
||||
"Calling unknown function '" << name << "'");
|
||||
func = def;
|
||||
}
|
||||
|
||||
if (func->kind != FUNCTION)
|
||||
throw_(calc_error, "Attempt to call non-function");
|
||||
throw_(calc_error, "Calling non-function");
|
||||
|
||||
return func->as_function()(call_args);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue