diff options
author | John Wiegley <johnw@newartisans.com> | 2012-02-21 01:45:26 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-02-21 01:45:26 -0600 |
commit | 1837e323916c7479623bb61e479407b85edee562 (patch) | |
tree | e44cd8458af9f8e81a04f3effe8e3885d17b1900 /src/scope.cc | |
parent | bc9ff7095fbfa1812e4f47dbf8531dec76cd0d00 (diff) | |
download | fork-ledger-1837e323916c7479623bb61e479407b85edee562.tar.gz fork-ledger-1837e323916c7479623bb61e479407b85edee562.tar.bz2 fork-ledger-1837e323916c7479623bb61e479407b85edee562.zip |
The new SCOPE mechanism is working
Diffstat (limited to 'src/scope.cc')
-rw-r--r-- | src/scope.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/scope.cc b/src/scope.cc index e18b5a0a..95347c8d 100644 --- a/src/scope.cc +++ b/src/scope.cc @@ -40,7 +40,8 @@ scope_t * scope_t::default_scope = NULL; void symbol_scope_t::define(const symbol_t::kind_t kind, const string& name, expr_t::ptr_op_t def) { - DEBUG("scope.symbols", "Defining '" << name << "' = " << def); + DEBUG("scope.symbols", + "Defining '" << name << "' = " << def << " in " << this); if (! symbols) symbols = symbol_map(); @@ -64,9 +65,12 @@ expr_t::ptr_op_t symbol_scope_t::lookup(const symbol_t::kind_t kind, const string& name) { if (symbols) { + DEBUG("scope.symbols", "Looking for '" << name << "' in " << this); symbol_map::const_iterator i = symbols->find(symbol_t(kind, name)); - if (i != symbols->end()) + if (i != symbols->end()) { + DEBUG("scope.symbols", "Found '" << name << "' in " << this); return (*i).second; + } } return child_scope_t::lookup(kind, name); } |