27 lines
574 B
C++
27 lines
574 B
C++
#pragma once
|
|
#include <string>
|
|
#include <map>
|
|
#include "error.hpp"
|
|
#include "ast.hpp"
|
|
#include "function.hpp"
|
|
#include "type.hpp"
|
|
#include "type_manager.hpp"
|
|
#include "gmachine.hpp"
|
|
|
|
namespace lily {
|
|
struct program {
|
|
type_manager type_mgr;
|
|
std::map<std::string, function> functions;
|
|
|
|
program();
|
|
|
|
void check();
|
|
void compile(instruction_manager& mgr, std::map<std::string, std::vector<instruction*>>& into);
|
|
void gen_llvm();
|
|
};
|
|
|
|
typedef std::unique_ptr<program> program_ptr;
|
|
|
|
program_ptr parse(std::string s);
|
|
}
|