summaryrefslogtreecommitdiff
path: root/src/module.h
diff options
context:
space:
mode:
authorŁukasz Stelmach <stlman@poczta.fm>2013-08-15 09:25:55 (GMT)
committerŁukasz Stelmach <stlman@poczta.fm>2013-08-17 14:22:00 (GMT)
commitd67e0129161a98f852ed2685f43e7eb7c7538bf0 (patch)
tree418dd6a58f70528d0d77b5d19f03161d95dfc00c /src/module.h
parentaf7e8320e2d0fda0e2b8505f50080ff3d33e7531 (diff)
Introduce '_current_module' and '_parent_module' variables
Add two built-in variables that provide access to the names of the current and the previously instantiated modules. Having these variables simplifies generation of BOMs and assembly graphs (e.g. with GraphViz). [std::stack]
Diffstat (limited to 'src/module.h')
-rw-r--r--src/module.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/module.h b/src/module.h
index b5c58af..fca88e3 100644
--- a/src/module.h
+++ b/src/module.h
@@ -4,6 +4,7 @@
#include <string>
#include <vector>
#include <list>
+#include <stack>
#include <boost/unordered_map.hpp>
#include <boost/unordered_set.hpp>
#include <time.h>
@@ -77,6 +78,8 @@ public:
AssignmentList definition_arguments;
LocalScope scope;
+private:
+ static std::stack<std::string> stack;
};
// FIXME: A FileModule doesn't have definition arguments, so we shouldn't really
contact: Jan Huwald // Impressum