summaryrefslogtreecommitdiff
path: root/node/StatementNode.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/StatementNode.hh
parentc5e9f890dab0e4595482301d77876793c8bceb8c (diff)
finish function calls and lvalue
Diffstat (limited to 'node/StatementNode.hh')
-rw-r--r--node/StatementNode.hh18
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