mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-15 19:38:44 +00:00
part of type deduction done, debugging in proces
This commit is contained in:
parent
a208e2f42d
commit
3815f8259b
6 changed files with 212 additions and 59 deletions
|
|
@ -34,7 +34,8 @@ public:
|
|||
bool Require(const AbstractType& type) const;
|
||||
|
||||
bool DeduceContext(const AbstractType& actual_type,
|
||||
std::unordered_map<std::string, std::optional<utils::IdType>>& context) const;
|
||||
std::unordered_map<std::string, std::optional<utils::IdType>>& context,
|
||||
TypeManager& type_manager) const;
|
||||
|
||||
std::optional<utils::IdType> GetFieldType(const std::string& name,
|
||||
const std::unordered_set<utils::IdType>& type_namespaces) const;
|
||||
|
|
@ -74,7 +75,8 @@ public:
|
|||
bool Require(const DefinedType& type) const;
|
||||
|
||||
bool DeduceContext(const DefinedType& actual_type,
|
||||
std::unordered_map<std::string, std::optional<utils::IdType>>& context) const;
|
||||
std::unordered_map<std::string, std::optional<utils::IdType>>& context,
|
||||
TypeManager& type_manager) const;
|
||||
|
||||
std::optional<utils::IdType> GetFieldType(const std::string& name,
|
||||
const std::unordered_set<utils::IdType>& type_namespaces) const;
|
||||
|
|
@ -179,7 +181,8 @@ public:
|
|||
bool Require(const TupleType& type) const;
|
||||
|
||||
bool DeduceContext(const TupleType& actual_type,
|
||||
std::unordered_map<std::string, std::optional<utils::IdType>>& context) const;
|
||||
std::unordered_map<std::string, std::optional<utils::IdType>>& context,
|
||||
TypeManager& type_manager) const;
|
||||
|
||||
std::optional<utils::IdType> GetFieldType(const std::string& name,
|
||||
const std::unordered_set<utils::IdType>& type_namespaces) const;
|
||||
|
|
@ -208,7 +211,8 @@ public:
|
|||
bool Require(const VariantType& type) const;
|
||||
|
||||
bool DeduceContext(const VariantType& actual_type,
|
||||
std::unordered_map<std::string, std::optional<utils::IdType>>& context) const;
|
||||
std::unordered_map<std::string, std::optional<utils::IdType>>& context,
|
||||
TypeManager& type_manager) const;
|
||||
|
||||
std::optional<utils::IdType> GetFieldType(const std::string& name,
|
||||
const std::unordered_set<utils::IdType>& type_namespaces) const;
|
||||
|
|
@ -240,7 +244,8 @@ public:
|
|||
bool Require(const OptionalType& type) const;
|
||||
|
||||
bool DeduceContext(const OptionalType& actual_type,
|
||||
std::unordered_map<std::string, std::optional<utils::IdType>>& context) const;
|
||||
std::unordered_map<std::string, std::optional<utils::IdType>>& context,
|
||||
TypeManager& type_manager) const;
|
||||
|
||||
std::optional<utils::IdType> GetFieldType(const std::string& name,
|
||||
const std::unordered_set<utils::IdType>& type_namespaces) const;
|
||||
|
|
@ -273,7 +278,8 @@ public:
|
|||
bool Require(const ReferenceToType& type) const;
|
||||
|
||||
bool DeduceContext(const ReferenceToType& actual_type,
|
||||
std::unordered_map<std::string, std::optional<utils::IdType>>& context) const;
|
||||
std::unordered_map<std::string, std::optional<utils::IdType>>& context,
|
||||
TypeManager& type_manager) const;
|
||||
|
||||
std::optional<utils::IdType> GetFieldType(const std::string& name,
|
||||
const std::unordered_set<utils::IdType>& type_namespaces) const;
|
||||
|
|
@ -300,7 +306,8 @@ public:
|
|||
bool Require(const FunctionType& type) const;
|
||||
|
||||
bool DeduceContext(const FunctionType& actual_type,
|
||||
std::unordered_map<std::string, std::optional<utils::IdType>>& context) const;
|
||||
std::unordered_map<std::string, std::optional<utils::IdType>>& context,
|
||||
TypeManager& type_manager) const;
|
||||
|
||||
std::optional<utils::IdType> GetFieldType(const std::string& name,
|
||||
const std::unordered_set<utils::IdType>& type_namespaces) const;
|
||||
|
|
@ -325,7 +332,8 @@ public:
|
|||
bool Require(const ArrayType& type) const;
|
||||
|
||||
bool DeduceContext(const ArrayType& actual_type,
|
||||
std::unordered_map<std::string, std::optional<utils::IdType>>& context) const;
|
||||
std::unordered_map<std::string, std::optional<utils::IdType>>& context,
|
||||
TypeManager& type_manager) const;
|
||||
|
||||
std::optional<utils::IdType> GetFieldType(const std::string& name,
|
||||
const std::unordered_set<utils::IdType>& type_namespaces) const;
|
||||
|
|
@ -351,7 +359,8 @@ public:
|
|||
bool Require(const Type& type) const; // TODO: check abstract type requirements for not abstract types
|
||||
|
||||
bool DeduceContext(const Type& actual_type,
|
||||
std::unordered_map<std::string, std::optional<utils::IdType>>& context) const;
|
||||
std::unordered_map<std::string, std::optional<utils::IdType>>& context,
|
||||
TypeManager& type_manager) const;
|
||||
|
||||
std::optional<utils::IdType> GetFieldType(const std::string& name,
|
||||
const std::unordered_set<utils::IdType>& type_namespaces) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue