summaryrefslogtreecommitdiff
path: root/node/StatementNode.hh
diff options
context:
space:
mode:
authorNagi5Yeq <wu@x-nagi.com>2020-05-29 00:17:00 +0800
committerNagi5Yeq <wu@x-nagi.com>2020-05-29 00:17:00 +0800
commitf15a071f6d599d2a21083dfb041b18db8d482949 (patch)
treea1b33b6ffe36f14a990dcfe5b9c5e593703d7ae0 /node/StatementNode.hh
parentd4e6ae6f8237f18d9d0b51e7a6404118dffb709f (diff)
remove ListNode, use std::move in AST building
Diffstat (limited to 'node/StatementNode.hh')
-rw-r--r--node/StatementNode.hh10
1 files changed, 9 insertions, 1 deletions
diff --git a/node/StatementNode.hh b/node/StatementNode.hh
index 1bd0cb6..5dea2ea 100644
--- a/node/StatementNode.hh
+++ b/node/StatementNode.hh
@@ -7,7 +7,15 @@
#include "ExprNode.hh"
namespace pcc {
-using StatementListNode = ListNode<std::shared_ptr<BaseNode>>;
+class StatementListNode : public BaseNode {
+ public:
+ StatementListNode(Context* context);
+ void Append(std::shared_ptr<BaseNode> child);
+ virtual Value CodeGen();
+
+ private:
+ std::list<std::shared_ptr<BaseNode>> childs_;
+};
class EmptyStatementNode : public BaseNode {
public: