aboutsummaryrefslogtreecommitdiffstats
path: root/c_parser/include/ast_top.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'c_parser/include/ast_top.hpp')
-rw-r--r--c_parser/include/ast_top.hpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/c_parser/include/ast_top.hpp b/c_parser/include/ast_top.hpp
new file mode 100644
index 0000000..737ff58
--- /dev/null
+++ b/c_parser/include/ast_top.hpp
@@ -0,0 +1,24 @@
+#ifndef TOP_AST_HPP
+#define TOP_AST_HPP
+
+#include "ast.hpp"
+
+#include <vector>
+
+class ast_Top {
+public:
+ void print() {
+ for(size_t i = 0; i < vec.size(); ++i) {
+ vec[i]->print();
+ }
+ }
+
+ void push(const Base *stmnt) {
+ vec.push_back(stmnt);
+ }
+
+private:
+ std::vector<const Base *> vec;
+};
+
+#endif