lily/src/type_manager.hpp

23 lines
546 B
C++

#pragma once
#include <memory>
#include <map>
#include <vector>
#include "type.hpp"
namespace lily {
class type_manager {
private:
int next_id;
std::vector<std::unique_ptr<type>> types;
std::map<std::string, type*> type_names;
public:
type_manager();
type_internal* create_int_type();
type_internal* create_str_type();
type_data* create_data_type(const std::string& name);
type* require_type(const std::string& name);
};
}