mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-28 17:58:44 +00:00
type_check_visitor first iteration, value, execution_visitor started
This commit is contained in:
parent
173d50672a
commit
890bd90eba
22 changed files with 481 additions and 452 deletions
|
|
@ -50,9 +50,14 @@ void LinkSymbolsVisitor::Visit(TypeExpression* node) { // TODO: check
|
|||
node->type_id_ = namespace_visitor_.FindType(path, node->type.type);
|
||||
node->constructor_id_ = namespace_visitor_.FindConstructor(path, node->type.type);
|
||||
|
||||
// if (!node->type_id_.has_value() && !node->constructor_id_.has_value()) { // TODO: check, that not bastract types
|
||||
// error_handling::HandleTypecheckError("Type or constructor not found", node->base);
|
||||
// }
|
||||
if (path.size() == 0 && namespace_visitor_.FindAbstractType(node->type.type).has_value()) { // TODO
|
||||
// abstract / basic / TODO: local abstract type
|
||||
return;
|
||||
}
|
||||
|
||||
if (!node->type_id_.has_value() && !node->constructor_id_.has_value()) { // TODO: check, that not bastract types
|
||||
error_handling::HandleTypecheckError("Type or constructor not found", node->base);
|
||||
}
|
||||
|
||||
if (node->constructor_id_.has_value()) {
|
||||
utils::IdType constructor_type_id = namespace_visitor_.GetGlobalInfo()->GetConstructorInfo(node->constructor_id_.value()).type_id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue