summaryrefslogtreecommitdiff
path: root/node/BaseNode.hh
diff options
context:
space:
mode:
Diffstat (limited to 'node/BaseNode.hh')
-rw-r--r--node/BaseNode.hh12
1 files changed, 12 insertions, 0 deletions
diff --git a/node/BaseNode.hh b/node/BaseNode.hh
index ab0b96a..bec9ebd 100644
--- a/node/BaseNode.hh
+++ b/node/BaseNode.hh
@@ -1,6 +1,8 @@
#ifndef PCC_BASENODE_H
#define PCC_BASENODE_H
+#include <vector>
+
#include "Context.hh"
namespace pcc {
@@ -12,6 +14,16 @@ class BaseNode {
protected:
Context* context_;
};
+
+template <typename T, class Base = BaseNode> class ListNode : public Base {
+ public:
+ ListNode(Context* context)
+ : Base(context) {}
+ virtual Value CodeGen();
+
+ private:
+ std::vector<T> childs_;
+};
} // namespace pcc
#endif