diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-24 19:40:16 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-24 19:40:16 -0400 |
commit | bc51cd4651225ad95190880c4d6f71e3a069ebbc (patch) | |
tree | c8c0288a029c403ad8f718393c71474edf0cc45d /src/scope.h | |
parent | 129b2de901ccfaa01f7c4a520c91787d83291ec3 (diff) | |
download | fork-ledger-bc51cd4651225ad95190880c4d6f71e3a069ebbc.tar.gz fork-ledger-bc51cd4651225ad95190880c4d6f71e3a069ebbc.tar.bz2 fork-ledger-bc51cd4651225ad95190880c4d6f71e3a069ebbc.zip |
Value scopes now take a parent scope for chaining
Diffstat (limited to 'src/scope.h')
-rw-r--r-- | src/scope.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/scope.h b/src/scope.h index dac6eba3..8b4a9380 100644 --- a/src/scope.h +++ b/src/scope.h @@ -605,7 +605,7 @@ call_scope_t::get<expr_t::ptr_op_t>(std::size_t index, bool) { return args[index].as_any<expr_t::ptr_op_t>(); } -class value_scope_t : public scope_t +class value_scope_t : public child_scope_t { value_t value; @@ -614,7 +614,8 @@ class value_scope_t : public scope_t } public: - value_scope_t(const value_t& _value) : value(_value) {} + value_scope_t(scope_t& _parent, const value_t& _value) + : child_scope_t(_parent), value(_value) {} virtual expr_t::ptr_op_t lookup(const symbol_t::kind_t kind, const string& name) |