obelisk/src/ast/prototype_ast.h

39 lines
834 B
C
Raw Normal View History

2022-10-17 22:26:36 -03:00
#ifndef OBELISK_AST_PROTOTYPE_AST_H
#define OBELISK_AST_PROTOTYPE_AST_H
2022-11-21 21:24:44 -03:00
#include <llvm/IR/Function.h>
2022-10-17 22:26:36 -03:00
#include <string>
#include <vector>
namespace obelisk
{
class PrototypeAST
{
private:
std::string name_;
std::vector<std::string> args_;
void setName(const std::string& name);
std::vector<std::string> getArgs();
void setArgs(std::vector<std::string> args);
public:
PrototypeAST(const std::string& name,
std::vector<std::string> args) :
name_(name),
args_(std::move(args))
{
}
const std::string& getName() const
{
return name_;
}
2022-11-21 21:24:44 -03:00
llvm::Function* codegen();
2022-10-17 22:26:36 -03:00
};
} //namespace obelisk
#endif