diff options
| author | Nagi5Yeq <wu@x-nagi.com> | 2020-05-29 00:17:00 +0800 |
|---|---|---|
| committer | Nagi5Yeq <wu@x-nagi.com> | 2020-05-29 00:17:00 +0800 |
| commit | f15a071f6d599d2a21083dfb041b18db8d482949 (patch) | |
| tree | a1b33b6ffe36f14a990dcfe5b9c5e593703d7ae0 /node/StatementNode.hh | |
| parent | d4e6ae6f8237f18d9d0b51e7a6404118dffb709f (diff) | |
remove ListNode, use std::move in AST building
Diffstat (limited to 'node/StatementNode.hh')
| -rw-r--r-- | node/StatementNode.hh | 10 |
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: |
