type check utils cpp, part of expressions type check, name tree type/name definitions extraction

This commit is contained in:
ProgramSnail 2024-01-04 17:06:09 +03:00
parent 512d011f72
commit 4f04dd9995
4 changed files with 99 additions and 20 deletions

View file

@ -171,4 +171,19 @@ private:
State &state;
};
nodes::TypeCheckResult type_same_to_expected(
nodes::TypeProxy type, nodes::MaybeTypeProxy expected_type,
const nodes::Node &node, error_handling::ErrorLog &error_log,
const std::string &message = "Different type with expected one");
std::optional<const nodes::TypeDefinition *>
find_type_definition_handle_errors(const std::string &name,
const nodes::Node &node,
SourcesManager &sources_manager);
std::optional<const nodes::NameDefinition *>
find_name_definition_handle_errors(const std::string &name,
const nodes::Node &node,
SourcesManager &sources_manager);
} // namespace type_check