summaryrefslogtreecommitdiff
path: root/node/BaseNode.hh
diff options
context:
space:
mode:
authorNagi5Yeq <wu@x-nagi.com>2020-05-25 16:14:41 +0800
committerNagi5Yeq <wu@x-nagi.com>2020-05-25 16:14:41 +0800
commit958a811b18aee04e4795cf003fd8e3db00312c91 (patch)
tree92cbc52f7560af0e08febfe1da38ed657ad29735 /node/BaseNode.hh
parentc5e9f890dab0e4595482301d77876793c8bceb8c (diff)
finish function calls and lvalue
Diffstat (limited to 'node/BaseNode.hh')
-rw-r--r--node/BaseNode.hh5
1 files changed, 3 insertions, 2 deletions
diff --git a/node/BaseNode.hh b/node/BaseNode.hh
index bec9ebd..16ee82d 100644
--- a/node/BaseNode.hh
+++ b/node/BaseNode.hh
@@ -1,7 +1,7 @@
#ifndef PCC_BASENODE_H
#define PCC_BASENODE_H
-#include <vector>
+#include <list>
#include "Context.hh"
@@ -19,10 +19,11 @@ template <typename T, class Base = BaseNode> class ListNode : public Base {
public:
ListNode(Context* context)
: Base(context) {}
+ void Append(T child) { childs_.push_back(child); }
virtual Value CodeGen();
private:
- std::vector<T> childs_;
+ std::list<T> childs_;
};
} // namespace pcc