diff options
| author | Nagi5Yeq <wu@x-nagi.com> | 2020-05-25 16:14:41 +0800 |
|---|---|---|
| committer | Nagi5Yeq <wu@x-nagi.com> | 2020-05-25 16:14:41 +0800 |
| commit | 958a811b18aee04e4795cf003fd8e3db00312c91 (patch) | |
| tree | 92cbc52f7560af0e08febfe1da38ed657ad29735 /node/StatementNode.hh | |
| parent | c5e9f890dab0e4595482301d77876793c8bceb8c (diff) | |
finish function calls and lvalue
Diffstat (limited to 'node/StatementNode.hh')
| -rw-r--r-- | node/StatementNode.hh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/node/StatementNode.hh b/node/StatementNode.hh index 595298b..68c808f 100644 --- a/node/StatementNode.hh +++ b/node/StatementNode.hh @@ -4,9 +4,27 @@ #include <memory> #include "BaseNode.hh" +#include "ExprNode.hh" namespace pcc { using StatementListNode = ListNode<std::shared_ptr<BaseNode>>; + +class EmptyStatementNode : public BaseNode { + public: + EmptyStatementNode(Context* context); + virtual Value CodeGen() override; +}; + +class AssignStatementNode : public BaseNode { + public: + AssignStatementNode(Context* context, std::shared_ptr<ExprNode> lhs, + std::shared_ptr<ExprNode> rhs); + virtual Value CodeGen() override; + + protected: + std::shared_ptr<ExprNode> lhs_; + std::shared_ptr<ExprNode> rhs_; +}; } // namespace pcc #endif |
