16 lines
519 B
C++
16 lines
519 B
C++
#include "type.hpp"
|
|
|
|
namespace lily {
|
|
type_data::constructor* type_data::create_constructor(const std::string& name,
|
|
std::vector<type*>&& params) {
|
|
auto new_constructor = std::make_unique<constructor>();
|
|
new_constructor->id = constructors.size();
|
|
new_constructor->parent = this;
|
|
new_constructor->params = std::move(params);
|
|
|
|
constructor* raw_ptr = new_constructor.get();
|
|
constructors.push_back(std::move(new_constructor));
|
|
return raw_ptr;
|
|
}
|
|
}
|