#ifndef PCC_FUNCTIONNODE_H #define PCC_FUNCTIONNODE_H #include #include "BaseNode.hh" #include "StatementNode.hh" #include "VariableList.hh" namespace pcc { class FunctionNode : public BaseNode { public: FunctionNode(Context* context, std::string&& name, std::list&& arguments, std::list>&& LocalDeclarations, std::shared_ptr ReturnTypeIdentifier, std::shared_ptr body); virtual Value CodeGen() override; protected: std::string name_; std::list arguments_; std::list> LocalDeclarations_; std::shared_ptr ReturnTypeIdentifier_; VariableList locals_; std::shared_ptr body_; }; class ExternNode : public FunctionNode { public: ExternNode(Context* context, std::string&& name, std::list&& arguments, std::shared_ptr ReturnTypeIdentifier, bool IsVariadic); virtual Value CodeGen() override; protected: bool IsVariadic_; }; } // namespace pcc #endif