Type check constructors.

This commit is contained in:
2019-06-09 20:24:44 -07:00
parent 0b544a2515
commit 0b80ce711d
8 changed files with 31 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
#pragma once
#include <string>
#include <vector>
#include <map>
namespace lily {
enum reserved_types {
@@ -34,7 +35,7 @@ namespace lily {
};
int type_id;
std::vector<std::unique_ptr<constructor>> constructors;
std::map<std::string, std::unique_ptr<constructor>> constructors;
type_data(int id) : type_id(id) {}
constructor* create_constructor(const std::string& name, std::vector<type*>&& params);