summaryrefslogtreecommitdiff
path: root/src/scope.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-13 18:39:26 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-13 18:39:26 -0400
commit2ea075dc4f48b5212a2b404e59ce16147871ba86 (patch)
tree52dc360b9afed97ac85774256bfa9f7dfe237590 /src/scope.h
parent7708ed1a750fb3dd79fad1562f0fec8a06422339 (diff)
downloadfork-ledger-2ea075dc4f48b5212a2b404e59ce16147871ba86.tar.gz
fork-ledger-2ea075dc4f48b5212a2b404e59ce16147871ba86.tar.bz2
fork-ledger-2ea075dc4f48b5212a2b404e59ce16147871ba86.zip
Report error context in expressions more precisely
Diffstat (limited to 'src/scope.h')
-rw-r--r--src/scope.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/scope.h b/src/scope.h
index 98b0ee02..07b6bebe 100644
--- a/src/scope.h
+++ b/src/scope.h
@@ -335,11 +335,17 @@ class call_scope_t : public context_scope_t
const bool required = false);
public:
- explicit call_scope_t(scope_t& _parent,
- value_t::type_t _type_context = value_t::VOID,
- const bool _required = true)
- : context_scope_t(_parent, _type_context, _required), ptr(NULL) {
- TRACE_CTOR(call_scope_t, "scope_t&, value_t::type_t, bool");
+ expr_t::ptr_op_t * locus;
+ const int depth;
+
+ explicit call_scope_t(scope_t& _parent,
+ expr_t::ptr_op_t * _locus = NULL,
+ const int _depth = 0)
+ : context_scope_t(_parent, _parent.type_context(),
+ _parent.type_required()),
+ ptr(NULL), locus(_locus), depth(_depth) {
+ TRACE_CTOR(call_scope_t,
+ "scope_t&, value_t::type_t, bool, expr_t::ptr_op_t *, int");
}
virtual ~call_scope_t() {
TRACE_DTOR(call_scope_t);