part of type_check_visitor

This commit is contained in:
ProgramSnail 2023-05-04 16:11:25 +03:00
parent 94ef8702fb
commit f7e985a448
10 changed files with 377 additions and 88 deletions

View file

@ -17,6 +17,8 @@ namespace interpreter {
namespace info::definition {
struct Namespace;
struct TypeUsage {
interpreter::tokens::TypeExpression* node;
};
@ -42,6 +44,8 @@ struct AnyType {
Parameter type;
std::vector<Parameter> parameters;
interpreter::tokens::AnyType* value;
Namespace* parent_namespace = nullptr;
};
struct Type {
@ -52,6 +56,7 @@ struct Constructor {
std::string name;
size_t order;
utils::IdType type_id;
std::optional<interpreter::tokens::TupleType*> constructor_tuple_node;
};
struct FunctionDeclaration {
@ -90,7 +95,7 @@ struct Namespace {
std::unordered_map<std::string, Namespace> namespaces;
std::unordered_map<std::string, Namespace> variable_namespaces;
Namespace* parent_namespace = nullptr;;
Namespace* parent_namespace = nullptr;
std::optional<Modifier> modifier; // modifier => variable namespace
std::string type_name;