mirror of
https://codeberg.org/ProgramSnail/lang.git
synced 2026-01-01 19:58:19 +00:00
type check utils: optional error handling, name expression type check part
This commit is contained in:
parent
c969dac7cc
commit
57b1172a4f
3 changed files with 117 additions and 112 deletions
|
|
@ -239,7 +239,8 @@ private:
|
|||
nodes::TypeProxy check_same_to_pass_type_in_arguments(
|
||||
nodes::TypeProxy type, const Arguments &arguments, const nodes::Node &node,
|
||||
SourcesManager &sources_manager,
|
||||
const std::string &message = "Different type with passed one");
|
||||
const std::string &message = "Different type with passed one",
|
||||
bool handle_errors = true);
|
||||
|
||||
// bool check_no_pass_type_in_arguments(
|
||||
// const Arguments &arguments, const nodes::Node &node,
|
||||
|
|
@ -249,33 +250,35 @@ nodes::TypeProxy check_same_to_pass_type_in_arguments(
|
|||
nodes::TypeCheckResult type_same_to_expected(
|
||||
nodes::TypeProxy type, const Arguments &argumensr, const nodes::Node &node,
|
||||
SourcesManager &sources_manager,
|
||||
const std::string &message = "Different type with expected one");
|
||||
const std::string &message = "Different type with expected one",
|
||||
bool handle_errors = true);
|
||||
|
||||
nodes::TypeCheckResult
|
||||
type_check_from_arguments(nodes::TypeProxy type, const Arguments &arguments,
|
||||
const nodes::Node &node,
|
||||
SourcesManager &sources_manager);
|
||||
nodes::TypeCheckResult type_check_from_arguments(
|
||||
nodes::TypeProxy type, const Arguments &arguments, const nodes::Node &node,
|
||||
SourcesManager &sources_manager, bool handle_errors = true);
|
||||
|
||||
std::optional<const nodes::TypeDefinition *>
|
||||
find_type_definition_handle_errors(const std::string &name,
|
||||
const nodes::Node &node,
|
||||
SourcesManager &sources_manager);
|
||||
find_type_definition(const std::string &name, const nodes::Node &node,
|
||||
SourcesManager &sources_manager,
|
||||
bool handle_errors = true);
|
||||
|
||||
std::optional<const nodes::FunctionDefinition *>
|
||||
find_name_definition_handle_errors(const std::string &name,
|
||||
const nodes::Node &node,
|
||||
SourcesManager &sources_manager);
|
||||
find_name_definition(const std::string &name, const nodes::Node &node,
|
||||
SourcesManager &sources_manager,
|
||||
bool handle_errors = true);
|
||||
|
||||
std::optional<nodes::TypeProxy>
|
||||
unfold_user_defined_type_handle_errors(nodes::TypeProxy type,
|
||||
const nodes::Node &node,
|
||||
SourcesManager &sources_manager);
|
||||
unfold_user_defined_type(nodes::TypeProxy type, const nodes::Node &node,
|
||||
SourcesManager &sources_manager,
|
||||
bool handle_errors = true);
|
||||
|
||||
std::optional<nodes::TypeProxy> get_field_type_by_name_handle_errors(
|
||||
nodes::TypeProxy type, const std::string &field, const nodes::Node &node,
|
||||
SourcesManager &sources_manager);
|
||||
std::optional<nodes::TypeProxy>
|
||||
get_field_type_by_name(nodes::TypeProxy type, const std::string &field,
|
||||
const nodes::Node &node, SourcesManager &sources_manager,
|
||||
bool handle_errors = true);
|
||||
|
||||
void type_check_error(const std::string &message, const nodes::Node &node,
|
||||
SourcesManager &sources_manager);
|
||||
SourcesManager &sources_manager,
|
||||
bool handle_error = true);
|
||||
|
||||
} // namespace type_check
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue