2019-06-04 20:45:06 -07:00
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include <map>
|
|
|
|
#include "error.hpp"
|
|
|
|
#include "ast.hpp"
|
|
|
|
#include "function.hpp"
|
2019-06-05 21:16:40 -07:00
|
|
|
#include "type.hpp"
|
2019-06-09 16:13:13 -07:00
|
|
|
#include "type_manager.hpp"
|
2019-06-04 20:45:06 -07:00
|
|
|
|
|
|
|
namespace lily {
|
|
|
|
struct program {
|
2019-06-09 16:13:13 -07:00
|
|
|
type_manager type_mgr;
|
2019-06-04 20:45:06 -07:00
|
|
|
std::map<std::string, function> functions;
|
2019-06-09 19:51:53 -07:00
|
|
|
|
|
|
|
void check();
|
2019-06-04 20:45:06 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef std::unique_ptr<program> program_ptr;
|
|
|
|
|
|
|
|
program_ptr parse(std::string s);
|
|
|
|
}
|