summaryrefslogtreecommitdiff
path: root/src/localscope.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/localscope.h')
-rw-r--r--src/localscope.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/localscope.h b/src/localscope.h
new file mode 100644
index 0000000..d81a27c
--- /dev/null
+++ b/src/localscope.h
@@ -0,0 +1,26 @@
+#ifndef LOCALSCOPE_H_
+#define LOCALSCOPE_H_
+
+#include "typedefs.h"
+#include <boost/unordered_map.hpp>
+
+class LocalScope
+{
+public:
+ LocalScope();
+ ~LocalScope();
+
+ size_t numElements() const { return assignments.size() + children.size(); }
+ std::string dump(const std::string &indent) const;
+ std::vector<class AbstractNode*> instantiateChildren(const class Context *evalctx, class FileContext *filectx = NULL) const;
+ void addChild(ModuleInstantiation *ch);
+
+ AssignmentList assignments;
+ ModuleInstantiationList children;
+ typedef boost::unordered_map<std::string, class AbstractFunction*> FunctionContainer;
+ FunctionContainer functions;
+ typedef boost::unordered_map<std::string, class AbstractModule*> AbstractModuleContainer;
+ AbstractModuleContainer modules;
+};
+
+#endif
contact: Jan Huwald // Impressum