From 2ea075dc4f48b5212a2b404e59ce16147871ba86 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 13 Jun 2010 18:39:26 -0400 Subject: Report error context in expressions more precisely --- src/post.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/post.cc') 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(1) && - ! args.get(1)->calc(bound_scope).to_boolean()) { + ! args.get(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(1) && - ! args.get(1)->calc(bound_scope).to_boolean()) { + ! args.get(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; } } -- cgit v1.2.3