namespace storage fix, namespace enter fix, maybe other fixes

This commit is contained in:
ProgramSnail 2023-05-13 18:53:54 +03:00
parent 4882d458f8
commit 4b4756b657
11 changed files with 250 additions and 174 deletions

View file

@ -44,8 +44,9 @@ struct AnyType {
Parameter type;
std::vector<Parameter> parameters;
interpreter::tokens::AnyType* value;
utils::ClassModifier modifier;
Namespace* parent_namespace = nullptr;
utils::IdType parent_namespace;
};
struct Type {
@ -92,11 +93,11 @@ struct Namespace {
std::unordered_map<std::string, utils::IdType> types;
std::unordered_map<std::string, utils::IdType> functions;
std::unordered_map<std::string, utils::IdType> constructors;
std::unordered_map<std::string, Namespace> namespaces;
std::unordered_map<std::string, Namespace> var_namespaces;
std::unordered_map<std::string, Namespace> const_namespaces;
std::unordered_map<std::string, utils::IdType> namespaces;
std::unordered_map<std::string, utils::IdType> var_namespaces;
std::unordered_map<std::string, utils::IdType> const_namespaces;
Namespace* parent_namespace = nullptr;
utils::IdType parent_namespace;
std::optional<utils::IsConstModifier> modifier; // modifier => variable namespace
std::string type_name;