diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-13 18:39:26 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-13 18:39:26 -0400 |
commit | 2ea075dc4f48b5212a2b404e59ce16147871ba86 (patch) | |
tree | 52dc360b9afed97ac85774256bfa9f7dfe237590 /src/post.cc | |
parent | 7708ed1a750fb3dd79fad1562f0fec8a06422339 (diff) | |
download | fork-ledger-2ea075dc4f48b5212a2b404e59ce16147871ba86.tar.gz fork-ledger-2ea075dc4f48b5212a2b404e59ce16147871ba86.tar.bz2 fork-ledger-2ea075dc4f48b5212a2b404e59ce16147871ba86.zip |
Report error context in expressions more precisely
Diffstat (limited to 'src/post.cc')
-rw-r--r-- | src/post.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/post.cc b/src/post.cc index bbf43227..675749fc 100644 --- a/src/post.cc +++ b/src/post.cc @@ -353,12 +353,14 @@ namespace { foreach (post_t * p, post.xact->posts) { bind_scope_t bound_scope(args, *p); if (p == &post && args.has<expr_t::ptr_op_t>(1) && - ! args.get<expr_t::ptr_op_t>(1)->calc(bound_scope).to_boolean()) { + ! args.get<expr_t::ptr_op_t>(1) + ->calc(bound_scope, args.locus, args.depth).to_boolean()) { // If the user specifies any(EXPR, false), and the context is a // posting, then that posting isn't considered by the test. ; // skip it } - else if (expr->calc(bound_scope).to_boolean()) { + else if (expr->calc(bound_scope, args.locus, + args.depth).to_boolean()) { return true; } } @@ -373,12 +375,14 @@ namespace { foreach (post_t * p, post.xact->posts) { bind_scope_t bound_scope(args, *p); if (p == &post && args.has<expr_t::ptr_op_t>(1) && - ! args.get<expr_t::ptr_op_t>(1)->calc(bound_scope).to_boolean()) { + ! args.get<expr_t::ptr_op_t>(1) + ->calc(bound_scope, args.locus, args.depth).to_boolean()) { // If the user specifies any(EXPR, false), and the context is a // posting, then that posting isn't considered by the test. ; // skip it } - else if (! expr->calc(bound_scope).to_boolean()) { + else if (! expr->calc(bound_scope, args.locus, + args.depth).to_boolean()) { return false; } } |