summaryrefslogtreecommitdiff
path: root/src/scope.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-07 05:16:34 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-03-07 05:16:34 -0600
commit2b108c66ccb7750660611a1a9fe5eb6cf63a686b (patch)
tree2a8824f999c3af0abcdb10a3045f5dbecac631ad /src/scope.h
parentc19b7099b2f135611192818bb968a7f8abb78493 (diff)
downloadfork-ledger-2b108c66ccb7750660611a1a9fe5eb6cf63a686b.tar.gz
fork-ledger-2b108c66ccb7750660611a1a9fe5eb6cf63a686b.tar.bz2
fork-ledger-2b108c66ccb7750660611a1a9fe5eb6cf63a686b.zip
Added an empty_scope_t utility class
Diffstat (limited to 'src/scope.h')
-rw-r--r--src/scope.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/scope.h b/src/scope.h
index 7a50c423..1b2566d5 100644
--- a/src/scope.h
+++ b/src/scope.h
@@ -136,6 +136,17 @@ private:
#endif // HAVE_BOOST_SERIALIZATION
};
+class empty_scope_t : public scope_t
+{
+public:
+ virtual string description() {
+ return _("<empty>");
+ }
+ virtual expr_t::ptr_op_t lookup(const symbol_t::kind_t, const string&) {
+ return NULL;
+ }
+};
+
class child_scope_t : public noncopyable, public scope_t
{
public: