commented code section removed

This commit is contained in:
ProgramSnail 2023-05-19 17:09:33 +03:00
parent afecbd64f5
commit 27f643dfbc

View file

@ -1519,32 +1519,6 @@ std::optional<FunctionDeclaration*> TypeCheckVisitor::FindFunctionAndUpdate(Func
}
}
// ------------------ replaced ------------------
// if (namespace_visitor_.GetCurrentNamespace()->modifier != utils::ClassInternalsModifier::Static) {
// std::string namespace_name =
// namespace_visitor_.GetCurrentNamespace()->type_name;
// utils::ClassInternalsModifier namespace_modifier =
// namespace_visitor_.GetCurrentNamespace()->modifier;
// namespace_visitor_.ExitNamespace();
//
// maybe_function_id = namespace_visitor_.FindFunctionId(std::nullopt, node->name);
// if (!maybe_function_id.has_value()) {
// // call functions from static namespace of current type
// std::vector<std::string> current_type_path { namespace_visitor_.GetCurrentNamespace()->type_name };
// maybe_function_id = namespace_visitor_.FindFunctionId(current_type_path, node->name);
// }
//
// namespace_visitor_.EnterNamespace(namespace_name, namespace_modifier);
// } else {
// maybe_function_id = namespace_visitor_.FindFunctionId(std::nullopt, node->name);
// }
//
// if (maybe_function_id.has_value() && global_info_.GetFunctionInfo(maybe_function_id.value()).declaration.has_value()) {
// node->function_id_ = maybe_function_id.value();
// maybe_function_declaration =
// global_info_.GetFunctionInfo(maybe_function_id.value()).declaration.value().node;
// }
if (!maybe_function_declaration.has_value() && node->is_binary_operator_expression && node->arguments.size() > 0) {
Visitor::Visit(node->arguments[0]);
maybe_function_declaration = FindExpressionMethodAndUpdate(node, current_type_);