mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-06 06:58:45 +00:00
link_symbols_visitor improvements
This commit is contained in:
parent
496d3819d9
commit
0dc8880c58
5 changed files with 33 additions and 6 deletions
|
|
@ -90,6 +90,8 @@ struct Namespace {
|
|||
std::unordered_map<std::string, Namespace> namespaces;
|
||||
std::unordered_map<std::string, Namespace> variable_namespaces;
|
||||
|
||||
Namespace* parent_namespace = nullptr;;
|
||||
|
||||
std::optional<Modifier> modifier; // modifier => variable namespace
|
||||
std::string type_name;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public:
|
|||
struct Path {
|
||||
std::vector<std::optional<utils::IdType>> path_types;
|
||||
definition::Namespace* result;
|
||||
}
|
||||
};
|
||||
|
||||
void AddImport(definition::Import&& import_info, const std::optional<std::string>& name = std::nullopt);
|
||||
|
||||
|
|
|
|||
|
|
@ -557,6 +557,9 @@ struct TypeExpression {
|
|||
TypeSubExpression type;
|
||||
|
||||
std::optional<size_t> array_size; // if array; 0 - dynamic size
|
||||
|
||||
std::optional<utils::IdType> type_id_;
|
||||
std::optional<utils::IdType> constructor_id_;
|
||||
};
|
||||
|
||||
struct ExtendedScopedAnyType {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue