diff options
| author | Nagi5Yeq <wu@x-nagi.com> | 2020-05-26 00:26:57 +0800 |
|---|---|---|
| committer | Nagi5Yeq <wu@x-nagi.com> | 2020-05-26 00:26:57 +0800 |
| commit | e83990754f49ec6eba7b9e1a5ff80a6add5de3a1 (patch) | |
| tree | 6308b4d0afa5bde2de82e7aa034058302cb1d193 /node/BaseNode.hh | |
| parent | 958a811b18aee04e4795cf003fd8e3db00312c91 (diff) | |
bugfix & test
Diffstat (limited to 'node/BaseNode.hh')
| -rw-r--r-- | node/BaseNode.hh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/node/BaseNode.hh b/node/BaseNode.hh index 16ee82d..71b0925 100644 --- a/node/BaseNode.hh +++ b/node/BaseNode.hh @@ -25,6 +25,21 @@ template <typename T, class Base = BaseNode> class ListNode : public Base { private: std::list<T> childs_; }; + +class FunctionNode; + +class ProgramNode : public BaseNode { + public: + ProgramNode(Context* context, const std::string& name, + std::list<std::shared_ptr<BaseNode>> GlobalDeclarations, + std::list<std::shared_ptr<FunctionNode>> functions); + virtual Value CodeGen() override; + + protected: + std::string name_; + std::list<std::shared_ptr<BaseNode>> GlobalDeclarations_; + std::list<std::shared_ptr<FunctionNode>> functions_; +}; } // namespace pcc #endif |
